Engineers are required to to make some kind of input to verify that they're still alert, or the train stops[1] if they haven't done anything in X seconds.
Obviously you wouldn't want the car to just stop in the middle of the road, but there could be something like that designed.
[1] https://www.quora.com/If-a-train-driver-falls-asleep-what-ha...