I’ve recently advocated for „wellness wednesdays“ to deal with accumulated tech debt routinely.
But there’s more that can be done:
Choose a lot of boring and established technology for your tech stack
Give your engineers the room/time to correctly implement things. Don’t push for new features unless old ones are stable
Plan additional time for refactoring and staying familiar with old parts of your code base. Make it a regular hackathon if you fancy stuff like that
Make peer reviews a thing
Avoid vendor lock-ins (like settling with a single cloud provider) at all cost
The longer you ignore your engineers’ hints towards the issues in your backyard, the harder you’ll hit the wall at some point.