The technique is called "monkey patching" and should be used with extreme caution.
Compressed F7 Layout probably isn't the best example to use in this case - it's turning off an internal function of Distant Stars so a slightly adjusted version can be run using a completely different method. A better example is, say, in Station Dock Control, in the "systemWillRepopulate" function (see file stationdockcontrol.js, around line 655), where I'm looking for stations that have a script with the "otherShipDocked" function in play. What I then do is:
1. Save the original script into a new location (in this example, to "station.script.$sdc_hold_otherShipDocked")
2. Give the station script a new "otherShipDocked" function, which will call the original script I saved in step 1, and then do any additional work I need done.
That keeps the integrity of the original author, and allows new code to be applied.
The "$" symbol is not important. It's purely my way of prefixing a function. Other coders use "_" as the prefix. Having a prefix like this ensures there is no chance of accidentally interfering with a core worldScript function.
The difficulty we run into with monkey patching is where you have multiple script using this technique on the same entry points - it can become a mess of spaghetti code that is a nightmare to unravel. So, the technique is available, and can work wonders, but use with caution. If there's another solution that can avoid this technique, it's better to pursue that one, if possible. For instance, working with the authors of the original OXP's to incorporate some changes to work with your OXP. If the author's are no longer around, there might be someone willing to take on maintenance of the OXP in order to implement the change.
If there's no opportunity to get the original OXP updated, then there may be no option but to use this technique, but hopefully this will provide some clarity on the dangers involved.