If making the cure was a 100% succes rate then yeah it's dumb 1 life vs extinction of the human race is a easy choice.
But there are reports they failed with other immune people to fabricate a cure.
That's part of it, but there's a whole 'nother level to it as well that doesn't get talked about quite as much: even if the Fireflies were successful in actually making a cure... then what?
What happens next exactly?
The entire game itself is the answer to that: consider everything Joel and Ellie had to do, everything they had to endure to make it all the way to the hospital at the end. They should have been dead like a thousand times over. And indeed, some of the writings and audiologs you can find in the game describe the "pair of survivors" wandering across the game as essentially complete freaks for being able to survive everything they do IIRC and more of a force of nature than anything, precisely because of how insane it is that Joel and Ellie were actually able to survive everything they did.
Then consider the journals/audio-logs you can pick up from Firefly members across the game as you're following after them. They similarly describe that Marlene's group, and the Fireflies in general, sacrificed a fuckton to even make it to the hospital. Even if they make a cure, they still have to get it back to a safe zone. And considering how hard fought the journey to the hospital was to begin with, the chances that they'd have a successful return trip, vaccine in tact, are extremely low. They were lucky to even get there; the chances they'd be lucky again and extremely low. Again, consider all the people that that tried to fuck with Joel and Ellie along their journey, nevermind the Clickers. That's all stuff they'd have to deal with going back, while protecting not only their lives but the vaccine as well.
Then
on top of that consider that the world of The Last of Us in general is a kind of fucked up place. One of the clear messages of the game is that humans are more dangerous than the Cordyceps, because at least with Cordyceps you know what to expect but with humans you never know when you'll be stabbed in the back. And if a vaccine were to be developed, everyone there would know exactly how powerful a bargaining chip such a thing could be, how much money they could get from such a thing, how much power over others they could gain from it. With how fucked up the world of the game is and how one of the themes is that you never can be sure who you can trust and who you can't, there's no way every single doctor would suddenly turn into pure noble saints were such a thing to be developed. No, at least a few of them would be tempted by greed, and that's all it would take to turn into an all out struggle over who will get the fame and glory by delivering the vaccine. And if someone somehow would make it out of that struggle alive with the vaccine, well, they would just be easy prey for the clickers once they get out and it wouldn't matter anyway.
And on top of that there's also the factor of how the Fireflies... aren't exactly the most, well, popular of groups, with many just seeing them as outright terrorists. A Firefly says they've actually developed a vaccine? Well, especially in a world like that of TLOU, something like that would sound too good to be true, wouldn't it? People would naturally be skeptical of such an outlandish claim, especially coming from a group like the Fireflies of all groups. Instead, many people are the type that would just kill any Fireflies they see, on sight and assume any "cure" is just some poison that they'd instantly just destroy rather than take any chances on. So that's something they'd have to deal with on top of the Clickers, in-fighting, and the other shit in attempting to make sure a vaccine gets all the way back.
And of course, all of this is
on top of, as you said, the low chances of them even developing a vaccine successfully in the first place.
When you put all this together, the entire game itself is a complete rebuttal to the idea that the Fireflies quest for a cure is nothing but a wild good chase in the world of The Last of Us. There's a billion different ways in could end in failure.
Considering all of that, in aggregate... yeah, there's absolutely no way I can disagree with what Joel decided to do. All it would take is even just one,
just a single one, of those things I described to happen for sacrificing Ellie to have been a complete waste, and the chances that not a single one, not even a single one of those scenarios actually occurring are impossibly, ridiculously low. Of course, Joel wasn't truly thinking about any of that. He was just thinking of doing whatever it took to protect Ellie, because he couldn't handle losing another daughter. But nonetheless, I can't imagine making any other decision with that all being the case.