Simple answer to overly complex handwringing
It seems to be the craze for some "researcher" or other to go into these "moralistic" binges about what should automated systems do etc. When it's really simple.
Car owner / driver is the first priority.
If you can maneuver to avoid a collision without any problems to anyone or anything, then do so.
If you can't avoid a collision, then apply maximum braking and hope for the best.
In a collision, assuming non human objects, try to maximize driver survival if possible (So if you are about to drive under the side of a truck try hitting the wheels instead so as not to lop the head off the driver).
Not really all that hard to figure out and about how thing work out anyways.
If people want it different, they can take the wheel.