Not only do sensors cost money (but not that much), sensors that can reliably detect and recognize ground hazards farther than the stopping distance of the train likely require either optics that won't fit existing dynamic envelopes, transmitters that would be radiation hazards to the train crew and nearby people in their own right.
But all that said, if the truck was only on the crossing for a minute, sensors monitoring the tracks or crossing could only mitigage but not avert this tragedy since the train wouldn't have been able to completely stop within a minute. It's clear the hualage company didn't coordinate this move ahead of time with the railroad and the only precaution against slow moving vehicle not getting ahead of a train would be to run trains at speeds where stopping distance is always less than line of sight, but running Intermodal trains at 20 MPH max would be a disaster both financially for railroads and for the economy overall.