No, child, if you need to do a genocide to continue living you deserve death. Period. There is no excuse for it. There is no possible justification you can make without being a Nazi.
Your life isn’t worth more than any other human’s; much less the lives of millions of other humans.
It is the best possible choice for anyone that has any humanity.
Many Nazis literally believed that if they didn’t kill the Jews their lives would end. They would be killed, Germany would be destroyed etc.
Their trolley problem as framed is the same as this one. And you’re picking the same decision as the rank and file Nazis did, as the reluctant Nazis did.
The best possible choice is walking away from this false binary an so no everything possible outside this false binary to prevent either track from ever being viable.
Derail the trolley, burn it down, tear up the tracks, assassinate the conductor and workmen that laid the tracks. Anything is a better choice than choosing to do a genocide.