One of the big issues with this is how consumers/government will require algorithms to prioritize.
i.e. one can imagine that there are accidents with a certain context wherein a driverless car could prevent x amount of people from dying, by killing its own passenger. For example an axle breaks, you can't turn right anymore, only left, and you're coming up on a right turn. You're supposed to turn right and stick to your lane, you can't, you either go straight onto the other lane, or go left. You happen to be driving an SUV and there's two small cars in the lane. If you go straight you hit both of them, and the camera registers 2 young children in each and an adult driving. Given the difference in car sizes, you're likely to survive but also likely to kill at least two kids, perhaps up to 6 people, you'll definitely destroy 2 cars and injure all 6. Or you take a sharp left and drive infront of them straight off the road, you drop down in a cliff and die. In both cases the computer calculates to a large degree of certainty that if either choice is made that it'd go down pretty much like this.
Now this is a silly edge case but it's the best I could come up with right away, more plausible ones exists. Anyway the question now becomes, is it okay for cars to be sold that are programmed to prioritize the passenger's life, i.e. killing the maximum amount of innocent people who are not you, estimated between 2 and 6, injuring at least all 6, creating the biggest economic damage and loss of life or livelihood to innocent people (particularly 'innocent' as their car's axle was just fine, yours wasn't).
Or would a government require the algorithm to take a different priority, one in which the car's software is programmed to sacrifice the car's owner/passenger, for the sake of a utilitarian calculation?
I think the answer is pretty clear what's fair, and that if a computer wasn't part of the equation that an ordinary human would likely not have had the mental fortitude to identify the axle steering issue and all options and choose the best one and that the outcome would be worse than a driverless car. But I also think it's pretty clear that the 'fair' decision would still be highly controversial and scary to imagine and something that'll see quite a lot of debate and pockets of resistance the next few decades.