If you are lucky enough to own one of the Marklin F7 sets “Alaska” or “UP” consider this easy repair. Or if you don’t like the wires running through the locos consider this easy repair.
Removing the wires is step 1: cut the wires before removing the shells and carefully remove the wires leading to each circuit board.
Soldering in place four very short wires is step 2: cut 4 small wires to bypass the 4 diodes on both circuit boards and carefully solder the wires in place.
Result: no wires running through the A-B-A units and much improved running performance thus allowing each locomotive to work independently of each other. Note: headlamps will light in both A units at the same time.