This is of course already done (to some extent) in aviation. Human error is indeed a start of investigation - there is extensive psychological profiling for pilots, why they did what they did given the circumstances, how much sleep did they get (often - not enough) and what function did they optimize (e.g. their salary bonus). One more thing is we have a co-pilot that can mitigate errors of the captain. Sadly, we don't (yet) for driving (and timescale of decision making is much smaller typically).