The other issue with the trolley problem is that it takes place on tracks, allowing for only two possible 100% fatal outcomes, and ignores braking (mitigation).There’s an interesting variation on the trolley problem where the two [and only two] options are to hit a bicyclist who’s wearing a helmet, or to hit a bicyclist who’s not wearing a helmet. By the above logic the car should hit the helmet-wearing bicyclist [since they’re more likely to survive], but would that unethically penalize the helmet-wearer for following the law? Might bicyclists be incentivized to stop wearing helmets because of this? This starts getting into prisoner’s dilemma territory.
In the real world with a car, I have multiple paths and braking. I don't think there would be sufficient time for a driver to register and ponder who was, or wasn't wearing a helmet. The original trolley problem, while an interesting thought experiment in ethics, is not very applicable to the real world, as the experiment is quite contrived, and assumes bad engineering from the start. As a real world equivalent, the sci-fi short story "Cold Equations" did a better job, but even that story gets criticism for bad engineering.