How to use a servo to throw a switch through thick foam
Here are some pictures showing how I used a bell-crank type mount to actuate a turnout through about 3 inches of roadbed, foam and plywood. This method is quite robust and very easy to align. The disadvantage is you can see the wire on top of the ties. However using a long wire from below is difficult because there is too much play in the system to reliably throw the servo. Of course, if I had planned ahead I could have cut out the foam below the turnout and put a plate underneath to mount the servo bracket on.
Closeup showing the crank and brass tube mounted through the foam.
Schematic diagram of the crank method for using a servo to actuate a turnout.