An MOT fail doesn't automatically mean you commit an offence, e.g. your vehicle has rusty sills and would fail the MOT on that basis, luckily your MOT is due next week, you go out driving and unluckily you're involved in an accident, tragically somebody is killed, a pedestrian.
Will there be a forensic examination of your vehicle? You bet there will!
Will the rust that is so serious as to be an MOT fail be noted? Of course!
But.... Is it relevant to the accident, i.e. was it in any way a contributing factor? No, and you won't be prosecuted for any offence relating to the rust, even though the MOT tester would deem the vehicle unroadworthy.
Very different if you blind an oncoming driver with non-compliant headlights and he / she crashes. Then a whole world of trouble is heading your way!!!