If you can't reliably run production on localhost, it's not because there is something fundamentally wrong with localhost. You're just not running your workload on a beefy enough localhost to remain local.
Think about it. All those cloud hosted workloads? All of them exist in a relative localhost.
I hold that in reality, localhost is the ideal, and any network hosts are the compromise you make because you just can't afford "dat localhost you actually need". The detail orientation and willingness to lay out things sufficiently on localhost by a singular developer simply exhausts.
You have 65535 ports. You can with the right hardware/architecture have truly ridiculous amounts of addressable RAM. Processors? Same deal.
The weak point of course, is your funding, and your willingness to get everything lined up. Which requires attention. Which is finite.
When dealing with teams of developers, there is the additional challenge of handling individual idiosyncracies, which is another issue that network partitioning naturally lends itself to spackling over, but even then, localhost is still theoretically capable of accommodating it.