You could use the Digitrax BDL168? and two of it's 16 detection zones.? The detection is via current draw on the track section. Detection generates a Loconet message.
Or use the Digitrax BD4.? But this requires more hardware to get the Loconet Message back to the Command Station or computer.? Or the BD4 is wired into some
I/O device to see the voltage state change.
Marc