The top choice is better, because if you add up all the people killed, an infinite sum of integers, the answer is -1/12. Way less suffering than the second track.
All these different, more extreme variations of the trolly problem seem to be missing the point of it. It's not about the deaths, it's about making the decision to be responsible for those deaths.
To rearrange the premise. If the person was a doctor, and three patients (tied to track A, current path) needed organs to live, and only one person, (Track B) had those organs, should the doctor make the conscious decision to sacrifice the person on track B to save the others?
The people on track A will die without the organs, that is already happening, and the doctor has no involvement in those deaths. However, by getting involved and consciously sacrificing the person on track B, the doctor has now committed murder and taken responsibility for the situation.
If there's countably infinite people on the track with nonzero space between them, the probability that any given person is any given finite distance from the trolley is 0, so practically no one gets run over.
simple answer: loop.
while the train is circling, you can start untying the people as they are resurrected.
the real question is whether the train is slow enough to get the time to untie those people between each pass.