This is a little more complicated than the trolley problem because pulling the lever doesn’t cause the train to kill one person instead of five. It causes the train to go onto a completely empty track where it won’t hit anyone, but there’s a small chance that changing the train’s direction will cause it to derail and crash into a crowd of people, killing many more than five of them.
If derailing kills 50 people and the chance of derailing is 1 in 100, the average number of deaths from pulling the lever is only 0.5. But you’re going to be pulling the lever a lot, eventually one of the trains will derail, and when 50 people die do you want to be the guy explaining that the expected value of your action was positive?
What if you’re really unlucky and the train derails the first time you pull the lever? Then you can’t even point out that pulling the lever in the past saved lives.