I've had conversations with "veteran" (i.e. old and no longer well-informed) techies who seem to think that all programming languages do exactly the same job, all DBMSes have the same ergonomics, choice of OS doesn't matter "if you know what you're doing", blah blah blah. This attitude isn't a mature counter to youthful starry-eyed overenthusiasm, it's just hopelessly jaded.
I rewrote the whole backend of my SaaS. I also completely redid the hardware and networking stack. This was because it was all a mess and fixing it would have been more risk and more work than just redoing it. Both projects were successful, and now the backend and the infrastructure are (a) future-proof, because they pass stress tests at 10x our current load, (b) much more reliable than they used to be, as measured by real-life uptime, (c) well-documented and (d) maintainable by people other than me. There's no magic to it, we just thought it through carefully and did some planning.