You could also gate experimental code behind feature flags which aren't set in prod
For example: How do they untangle a wad of code that is large enough that it takes longer than a few days and more than a single developer to get the code back into a state that is acceptable for trunk?
The changes required for this kind of refactorings can be all over the place, regardless of any organizational boundaries in your code. I can't see how changes of this nature can be put behind feature flags.
- make all code that uses said code use the interface instead
- build the feature switch into the interface
(i.e. you create the new API, migrate stuff to use it, deprecate the old one, migrate the rest, retire the old one).