There are two super interesting problems in here.
One is: would you bet human lives on a conjecture being true? The collatz conjecture does hold for every number we have tried, but there have been conjectures that were disproven with a very large counterexample. You could kill countless humans if wrong, so even if you think the chance of a counterexample is low, is it low enough to outweigh that potentially very hight value counterexample?
The second one is: Let's say the collatz conjecture holds, and the number of passsengers just loops 4 -> 2 -> 1 -> 4 -> 2 -> 1 eventually. What is the 'final' number, when the trolley is done with the infinite loops? It can't be 1, because that is always followed by a 4. And it can't be 4 because it's always followed by 2 and so on. But it has to be one of those, because any other number is not possible. It reminds me of the Vsauce Video Supertasks, which comes to the conclusion that we can't know the answer to these type of questions.
So in conclusion, flipping the switch will either give you an arbitrarily large number of deaths, or an unknown number of deaths. Fun!