> Section 31 angle is tricky, because the writers unintentionally[1] made them literally save the entire alpha and beta quadrants, and possibly the entire galaxy, from slow-burn genocide.
I mean, Jack Bauer, too, saved America from all kinds of unspeakable evil by his clever use of torture. I'd say it's not tricky at all. The morally gray "it's bad but we'd be even worse off without it" justification is kind of the point of those narratives.
Yes, but the difference is that Section 31 in DS9 is obviously "the baddies" to the heroes and the audience, and writers meant it to be "the baddies", and everyone in and out of universe was supposed to be appalled at the mutagenic virus subplot, and yet, taken in context of the larger events in the show, Section 31 came out as a light shade of gray instead of black.
It's one thing if them doing their thing was merely convenient, but the rest of the writing in the show converged into a situation where the Federation was under the wall, with no way to talk or shoot their way out of total defeat (and Earth being glassed to make a point). For Star Trek, that's pretty much a franchise-terminating event; they needed to write their way out of that corner - and Section 31 plot basically did that, before they realized it.
AFAIK the writers did not intend Section 31 plot to be posing the question whether any means are justified if the alternative is being exterminated - but it's what they inadvertently ended up doing.
(It's not the only time they hit a problem like this. AFAIR, the episode "Waltz" was made specifically because fans found more depth in the character of Dukat than the writers intended; as such, the whole point of that episode was to drive home that yes, Dukat is just that evil, period.)