Most of the problem:
"Dealing with pedestrians safely is difficult, expensive, and culturally alien to the nerds building the cars;"
Is because the nerds building the cars are living and have grown up in countries where car is king and pedestrians aren't allowed to step onto the road.
The rest of the world isn't like that.