Well yes, but you're completely misunderstanding how the trolley problem applies to voting, esp. in the USA. You're pretending that "Not Voting" and "Voting" are the switch options, but that's simply not true.
There are just two possible outcomes: Dems or Reps getting power. That's the switch options you have. "Not Voting" simply means letting the trolley take the Rep route and being JUST AS CULPABLE for the results as every single republican voter.
Your fantasy of "not voting" being an actual moral option is like arguing "I disagree with the concept of a trolley, so I'm just going to turn away from the switch". You're morally exactly as culpable, because you made a choice that is morally the equivalent of "not switching tracks".
There is a subtle difference though because a vote is supposed to be a act of support. With the trolley problem there is nothing to support.
Voting for party A/B is a reward that encourages party A/B to do more of what they're doing.
So let's say only 1000 people voted because everyone else hated both options. That would pave a path for party C that would not exist if everyone held their nose and voted for crap.