Braking is not instantaneous at any speed. You will still continue to travel at least some distance while you decelerate.
Your comment makes sense if you are trying to prevent a collision with another moving vehicle in front of you, you can make sure you have enough braking distance to come to a complete stop if the other car does as well.
What if you're doing 50km/h with a pedestrian on the sidewalk 10 metres ahead of you to your right? If the pedestrian steps or falls out suddenly into the road you won't be able to avoid hitting them without swerving, most likely into the adjacent lane. That lane might have another car or a gaggle of nuns tied up by an ethics professor in it already that you will have to contact in avoiding the pedestrian.
If you maintain a safe braking distance between your vehicle and all objects, even ones you don't expect to enter your path, you would be unable to travel above 0km/h in most situations.
Consider driving along an undivided highway. An approaching car veers into your lane. You definitely want to swerve, rather than brake and risk being hit head-on.
Of course, we can contrive a situation on top of that, like a group ride of cyclists to your right, so swerving will take them out...
But that is besides the point. I am just saying that there are cases where braking is not the safest thing for the occupants of the car.
So the decision to swerve is the trolley problem either way. You know the cyclists are there, and swerve because the occupant is valued more. Or the car doesn't know if cyclists are there, swerve and these possible/virtual cyclists are sacrificed for the occupant of the vehicle.
The person I was replying to said this is nonsense, as in a car you can just brake and nobody gets killed. I explained that there is a real-world situation where braking is not an escape, it is—as you say—equivalent to directing the trolley to the line where there is one victim.
We agree that the trolley problem in the abstract is about making a choice as to who is harmed. I was just pointing out that car brakes do not invalidate the concern.
I've predicted for years now that the first day of automated driving will have to solve the trolley car problem. I can only see one way out: we make a rule e.g. automated cars cannot leave the roadway.
Agreed it shouldn't be left to the companies - that's why the 'make a rule' idea. Else the companies are in an escalating war of ad-hoc behaviors to preserve their customer vs all others.