The FRED units at the end of a train and the trackside sensors perform much of that function, but only to relay the condition of the train to the conductor and the dispatcher. Positive Train Control is the real answer to these kinds of operator errors.
I see what you mean. Though there you would still have the possibility of “error by computer”.
http://gpsworld.com/no-positive-train-control-on-train-that-derailed-over-i-5
“PTC makes it possible to monitor the location of the train and the speed at which it travels, by using GPS and sensors placed both in the trains and along the tracks.
A computer system centralises the data and prevents any excess speed, any red light or collision with another convoy by acting on the locomotive instead of the driver, to curb if it goes too fast, or stop it completely if an obstacle has been detected on the tracks for example.”