Use the Mikado Method to do safe changes in a complex codebase - Change Messy Software Without Breaking It
(understandlegacycode.com)
The way I've heard it is this...
"How to make a difficult change: First make it easy to make that change. Then, make the easy change."