While this is awful, unless there were underlying mental health issues, I really think its basic common sense you pull over if a child wont settle. I dont see how stress or sleep deprivation alone make you lose very, very basic common sense.
I went 2 days without any sleep after my DF passed - I made plan b arrangements re a car drive as i was a wreck/wasnt fit to drive. Having said that, we are all different, there are people who dont 'get' things like that, even when not stressed/not sleeping.
That is, I have friends who regularly do unsafe stuff re child safety in cars/at home re supervision: and call anyone shocked 'uptight'. I'd rather not take the risk than be as 'laid back' as they are. The woman who left her toddler playing by a pond while she sat out of sight indoors, texting & he died, springs to mind. Unbelieveable.