The trolley problem is about innocent people. When one of those people is the reason the others are in danger because they are actively trying to kill them, the problem kind of goes away. Almost nobody says you should just let them continue murdering.
It's never over. Many have waited to succeed him. Some of them, if they had the chance, will not hesitate give you far more difficult choices than their predecessor ever dared to give, and it is then that you and many others will think fondly of him and curse the one that killed him.
But, what if that person was a time-traveller, and was actually tying future mass-murders, serial killers, and dictators to the tracks before they ever got a chance to start their crimes?