I've previously suggested a simple solution - cameras activated when the crossing protection is activated which simply record anything seen until shortly after the arms are raised and lights shut off. No data transmission is needed, just a simple SD card that records what is seen (and overwritten when data space is needed) so police or RR people can, after the fact, pull the card.A small video camera could record the crossing action like police body cameras fixing the blame where
it is almost always the fault of the motorist for the inattention.
Would not need all the fancy camera lighting action at rural crossings - only at major city crossings with
a history of collisions.
Better would be another that only records any activity crossing the tracks at the same time so offenders could be caught and (optionally) cited. Something like red light cameras only with multiple warning signs they are activate (prevention is the key) and not government "adjusted" as some red light camera intersections have been to shorten yellow lights only at camera locations. Red light cameras are mostly money makers otherwise they would have a clear warning sign next to the camera.
Since prevention would be the primary purpose, the first citation would be a warning (unless of course it is the driver's last act).