Might be simpler and easier to have a standard microswitch mounted between the tracks, operated by some sort of sprung lever fixed to the underside of the train.
The type of switch I have in mind are those in a plastic oblong case about 28mm x 16mm and 10mm thick, made by Honeywell for central heating valves, with a plastic button that operates the switch, (see below). You can get ones with a metal lever on top which pushes down on the button.
Or even better, file a shallow slot out of the top of one rail and fix the microswitch outside of the track with its operating lever over that slot, in such a way that the train wheels will pass over unhindered, but will push down the lever and close the switch when it passes over. Microswitches of this type are available to switch several amps, so should be able to switch signalling without needing extra relays etc. which a reed switch probably would.
This idea will work for any engine, since they won’t need modifying. And be much easier than messing about with magnets and clearances; trying to get the magnet aligned to switch the reed reliably. And having to do that on all the engines.
Or, if you really want to go the electronics route, a photo-diode or transistor between the tracks looking upwards: Switched when the train goes over the top, blocking the ambient light. No modifications to the engines, or magnets or alignment required, but will need compensation for ambient light levels, and electronics. Will work for any train or carriage, (or any runaway).
Switching speed simply requires positioning the switch a suitable distance before the train reaches the point where the switching needs to happen, taking into account the fastest train speed likely.