@StephenTallentyre @catsalad I like this!
I believe, though that the solution to the trolley problem doesn’t involve flipping the switch, which is probably locked anyway (or, if it is an old interlocking system, is controlled remotely).
The solution is to stand in the middle of the tracks. The trolley driver will slam on the brakes. Just before the trolley would hit you, you jump off the tracks. The trolley is now going slowly enough to stop before running over anybody.