Good APIs between your code (that means programmatic interfaces, not necessarily over the network) help alot.
If you have a subsystem conform to a good API and is well behaved it can be rewritten. It is allowed to have some tech debt.
If the subsystem is sprawled through other subsystems that tech debt doesn't get paid down because now you need an expert in all those areas to fix it.
I swear I have worked places where there is code no one currently at the company can understand. At best you micro-fix for bugs and back the hell away!