Upvoting specifically since I loved this hypothetical scenario:
If the one guy is there to repair the tracks, and is supposed to be there, and the multiple people are there because they want to get you to switch the trolley because they want to kill the one guy, well, the moral calculus gets a lot more complicated.
Upvoting specifically since I loved this hypothetical scenario: