It would be interesting to see train conductors on electric mountain bikes, with drones scanning each side of the stopped train for damaged or cut air hoses, hotbox bearings, etc. Could save a lot of walking, if the railroad and the union agree.
Automated (dye) gun turret car every 50 meters of the train.
Some cars are 89 feet long, so every 50 meters is every third car. That's a lot of overhead. Theft would have to be huge for that to be anywhere near realistic.
Sounds like it is huge.
A gantry outside of Barstow that plops a device on top of every third (or fifth) car. Outgoing traffic collects them off again.
It would still be less expensive than an armed Marine, and that solution has been effective before.
Disposable overalls: $10
That's why they don't use dye in protecting cash, and no-one ever got in jail by getting dyed.
It works great against the unprepared, not so much against people who plan ahead.