My old FTC team had these really awesome 3d printed “clips” which would prevent a cable-to-cable connection from falling apart. I’ve been trying to find the file, but haven’t been able to locate it.
It looks something like this (excuse my poor ASCII art)
When we anticipate an issue with cable-to-cable connection (usu. PWM/servo wires), we cut a piece of heat shrink tubing a bit longer and wider than the pair of connectors, disconnect, slide the tubing on, reconnect, reposition, and apply a bit of hot air. Don’t use marine heat shrink for this; it is a mess if you do have to cut it off.