Yes, The LCS SensorTrack is both a sensor as well as a preset & user programmable storage unit. Up to 250 time-stamped commands are stored in a recording. And you can create two different recordings--one when your engine or train passes from left-to-right, the other when moving right-to-left.
It won't do the logical conditionals you describe. The recorded commands are sent to specifically to the locomotive which triggers playback by crossing that SensorTrack. However, you can include commands for switches and accessories within each recording. Finally, you can set your custom sequence to play ONLY when that specific engine passes. Then you could automatically shunt a passenger train into a station siding each time it approaches, yet keep all other trains on the main line.
Great questions. You're helping get me ready for York!
-Rudy