You don't even need a relay to use the insulated rail effect. Take for example the 145 gateman or the 151 semaphore. You just connect the accessory's common post to the hot post of the transformer (ZW, any A-D not U). B or C is best so you can set the voltage leaving A and D for throttles.
These two, and many other accessories have three terminals. In both cases the accessory's common is easy to identify, because it is not insulated from the metal body of the unit. The other two terminals need a ground connection. Both examples have a light and a coil terminal. The light is hardwired to the ground. while the coil is connected to the insulated rail. Train goes by, and coil is energized, and the semaphore arm comes down or the gateman's door opens.