Adding infrastructure for its own sake is a terrible idea. Someone is going to have to care for that infrastructure, its going to be another thing to keep on your mental model of how everything fits together, and in many cases it's going to be another thing that needs changing when the requirements change later.
Obviously just adding more moving pieces for no benefit is a waste of time. However there are many areas that can be improved or even entirely automated with software.
My bigger point was that writing code is not "a bad thing that should be avoided" because I think it helps programmers understand the problem and can add more value than debt. Even if it may change at some unknown point in the future.