This isn't relevant to autopilot in cars, it's just fear mongering.
Humans have driven cars for a century now and animal-driven vehicles for millennia before that. I have yet to find a single documented case of the trolley problem occurring in real life with a vehicle. This simply is a problem which does not exist.