Any system that alerts a train to the presence of an obstruction on the tracks, would have to alert the engine crew at least 60 - 90 seconds in advance. if the obstruction is present for 10 -15 seconds, it could likely clear the crossing within 30 - 45 more seconds. Meanwhile, the engineer has initiated an emergency brake application for nothing. Once he/she has done that, the train WILL stop. There is no changing your mind. An emergency stop will put stress on every part of the running gear of the train, and in extreme cases can result in a derailment. The train cannot safely resume its journey until it has been inspected. In the case of a long freight train, this means the engineer stays in the cab while the conductor walks to the rear of the train and then walks back to the front on the opposite side. Modern freight trains are often well over a mile in length. Then the train line must be recharged with air to release the brakes. If the obstruction is detected less than 60 - 90 seconds before impact, there may be no reason to slow or stop the train anyway because the collision may be inevitable. If that happened every time some driver cuts it close, the RR system would be nearly crippled with unnecessary stops. Yes, the problem is that widespread. The solution is not to stop the train from doing what trains do. The solution is to keep vehicular traffic off the tracks where they don't belong.
NO MACHINE CAN COMPENSATE FOR POOR JUDGMENT.
Tom