Perhaps you could...
I think you could consider this:
1 - You should be able to ascertain if two trains are in the SAME rails. Probably some identification signal periodically sent through power lines, or...? Read about that, years ago but can not recall details (Europe, perhaps?)
Knowing that they ARE NOT, would help to eliminate the doubt for the majority if not all the trains running at a certain moment in the area under surveillance.
In places where rails are running quite close to the next, eventual (temporary) lack of precision in the system could rise unnecessary alarms or, by the contrary, hide an actual dangerous situation.
2 - If they are in the SAME rails, GPS could say if they are approaching each other. Lack of accuracy is not so relevant. Just to know in what sense each one is moving.
I wonder if fixed references ("beacons" on the ground) would not help to reduce complexity in the evaluation process. Just guessing here... :?
External control should be the base of the system, I think.