Let's say that you pay a lot. Like you expend $20.000 USD doing this.
But we forget the cost power of software.
Your monthly savings extend to the infinity.
Your dev is now freer to do other things that are precluded in a more complex scenario ("you save pennies here, but expend pounds elsewhere"), because complexity DEMANDS MORE ATTENTION.
This is something I have observed all my life. I have never regretted to optime]ize for operational costs even if this means I "waste" a lot of time for this. I work in a more cutthroat environment than most startups (ERPs), where my time to deploy to production something is measured in hours, and is an environment that is filled by the graveyard of my competitors that have drink all the kool-aids.
Complex operational environments ALWAYS have turned worse/more complex than do the simplest things.
P.D: I think is similar to spending time in refactoring, cleanups, testing, security audits, training, and even resting.
All of that sounds like "costs". But you are doing this stuff alongside, just need to budget a few hours a week on this and the profits come and come.
Never regret using time on this stuff.
NEED to be smart on this? Sure. But is pure muscle and after a while is great.