This is actually a really interesting one! It questions your faith in humanity. All everyone has to do is not pull the lever. If the remaining population of humanity is on the 33rd switch, then just 33 randomly selected people all have to not choose to kill anyone. But can you trust such a huge decision to a stranger? Will the person further down the tract trust them or kill more people to safeguard humanity?
Personally, I think one life is worth sparing humanity this risk of annihilation. I could live in a world where my life might be randomly sacrificed to safeguard humanity if it only happens once.
We don't even know if the dilemma stops at the 33rd switch. If it doesn't, there would be a perpetual choice between killing everyone and not killing everyone that would be constantly passed down to different, random people. At that point, you require every single person to be willing to choose not to kill humanity - which is a difficult requirement. I have pretty big mood swings myself.
If it doesn't stop at the 33rd switch, it's almost definitely correct to pull the lever no matter where you are in the order, if it comes to your turn. The chance that 8 billion people will all choose not to pull the lever is almost zero - That also includes children and babies who have no concept of morality, and one of them may even pull it accidentally. Over a long enough timeline, this would almost definitely happen. In fact, depending on how far apart the levers were, the trolly reaching new levers might not even outpace the rate of children being born, so it would just be an unending string of babies and levers after a certain point.
If you accept that it will eventually be pulled, then if you are in the first 32 people, you're killing fewer people by pulling it, because eventually, all but 1 person will die otherwise. If you're past the 32nd person, eventually everyone except 1 person will die, so it really just comes down to whether or not you want to be the last human alive. Since most people value their own life more than the life of an unknown stranger, the correct choice is to pull the lever.