Sometimes you can do everything right, and still lose.
Sometimes there is no 'out.'
Sometimes things are beyond your control, so you do what you can with the best info you have and with the limited time you have... and you either have a close call that makes you marvel at your supreme skill and judgment, or you wake up asking yourself, "What the hell happened?"
I've been in one serious wreck. There was no out, even if I could have made a decision differently earlier. Maybe there was a subtle clue, but I recognized that only in hindsight and it would not have registered without the wreck and subsequent pondering... in short, useless at the time and even now. It amazes me how fast a person can flip through all of the options, make a decision, and commit to a course of action... in my case in way less than a second... and then knowing that you're fucked keep your head in the game and not give up until the bitter end. In my case there was no time for fear even with the realization that 'this is going to be bad.'
Those who were uninvolved like to think that there was something that could have been done better, that the accident could have been avoided, if only... and that is just another form of whistling past the graveyard, of rejecting the reality of 'there but for the grace of God go I'. It's how humans deal with cruel capricious fate: 'it couldn't happen to me!'
Heal quickly, OP... and for others don't ever think it can't happen to you.