I would try the 10cm wire first and check how firmly the switch rails are held against the running rails. The danger is that they are not held firmly and will move under a passing train to derail it.
If that is not reliable, you could use DCC concepts right angle adaptor
Cobalt Right-Angle Adapters w/Mounting Hardware (3 Pack)
This allows you to turn the motor on its side. It is intended for mounting under the baseboard to reduce the depth it needs. The reduced depth means the cavern you need to carve in the 40mm foam is shallower.
You will be able to use the alternative mounting holes to attach the motor to the top of the ply. You will have to reverse the wires on the angle adapter so that it points upwards away from the baseboard. As delivered the actuating wire is facing the mounting surface which is fine for an undermounted motor but you will be overmounting and need the opposite direction. As everything is secured by machine screws, alteration is not difficult.
David
If that is not reliable, you could use DCC concepts right angle adaptor
Cobalt Right-Angle Adapters w/Mounting Hardware (3 Pack)
This allows you to turn the motor on its side. It is intended for mounting under the baseboard to reduce the depth it needs. The reduced depth means the cavern you need to carve in the 40mm foam is shallower.
You will be able to use the alternative mounting holes to attach the motor to the top of the ply. You will have to reverse the wires on the angle adapter so that it points upwards away from the baseboard. As delivered the actuating wire is facing the mounting surface which is fine for an undermounted motor but you will be overmounting and need the opposite direction. As everything is secured by machine screws, alteration is not difficult.
David