No it's not. Both the trolley problem and the prisoners dilemma are individual event thought experiments.
Real life is different, it is continuous. The rational choice for an individual event can be very different than a continuous one.
Take the prisoner's dilemma (or game theory) for instance, it is the rational decision (nash equilibrium) to rat your fellow prisoner out but if you have to do it again and again, then the best strategy is to NOT rat out your fellow prisoner (only rat when they ratted you out in the last round).
Reality is often like this, and elections are also like this. It gets complicated real fast.
I know it's just a meme but they both solve different enough problems. A self-driving car can easily turn back into a non-self driving car, meaning you can self drive for long transit and switch to a normal one in the city or hectic areas. This basically solves the issue of self drive tech not being smart/reliable enough. Which, as you probably also agree, is still quite far from perfect.