Yes, by all means let's credit Section 31 or the Founders for ending the Dominion war and not Federation, Klingons, Romulans, Remens and even Ben Sisko and his crew who fought the war on the front lines.
Sadly for the allied militaries, they didn't actually win the war and their efforts were all for naught. The wormhole aliens won the war by blocking the wormhole, for reasons of their own that seem related somehow to Ben Sisko, but not at all to what the Feds, Klingons, Dominion, et al wanted or were doing. Without that factor, the allies could very well have lost. So really, what did they accomplish except killing time?
S31's virus might get some credit for preventing the Female Founder from sending the Jems on a killing rampage because without the virus, she would not have been grateful to Odo for saving her, and uncharacteristically non-homidical as a result. But how could S31 predict she'd react that way? It would be more in character for her to order a killing rampage as punishment for the virus, regardless of whether Odo cured her. S31 dodged a bullet there.
So in the end, the allies won because the writers wanted them to. And S31's virus didn't result in disaster because the writers didn't want it to.
I think she may have thought that Odo returning to the link was of more importance then fighting an obviously lost war?
If Odo returning to the Link was so important, then why didn't she tell Odo during the time the Dominion occupied DS9 that if he's return to the Link, they'd stop the war? He hardly could have turned down that deal.
And if she stopped fighting because the war was obviously lost, the wormhole aliens get credit for that. The allies don't.
The Prophets just evened the odds. That would have meant nothing had the Feds and their allies not been able to defeat the Dominion forces already present in the AQ.
The wormhole aliens prevented reinforcements from arriving, and the Female Founder refrained from using the forces present in the AQ to wreak vengeance. Both are arbitrary ass-saves on the part of the DS9 writers. They didn't allow their protagonists to actually win the war, and I'm not convinced that they even realized what they were doing, considering the illogic they forced on the characters in order to get their plotline to work. One way or the other, S31's virus did help save lives, yet I doubt the writers wanted to send a pro-genocide message. And the Female Founder was forced to be totally out of character because the plotline wouldn't have worked otherwise.
Also, people are blowing up S31's contribution to the victory out of proportion. I don't get why some people think the Allies wouldn't have won anyway.
The reason the allies won is because the wormhole aliens blocked the wormhole. The virus just prevented the Female Founder from killing a lot of people in the AQ. It would be completely in character for her to send the Jems on a murderous rampage when she realized the war was lost and they were trapped, and that certainly holds true if she thought her enemies were trying to commit genocide. So that part doesn't even make sense.
To summarize: the allies won through dumb luck. S31's virus didn't result in disaster, also because of dumb luck. Perhaps the larger message here is that war is a huge clusterfuck and dumb luck is always a big part of it.
S31 must have offered the cure in exchange for surrender long before WYLB (otherwise, what's the point of infecting them in the first place? why wait for millions of your people to die? and practically win the war regardless of the virus?) and the Dominion must have refused.
That notion is rather horrifying because for S31 to do that, would reveal that people associated with the Federation were responsible for the virus, and the very likely response of the Dominion would be to go on a murderous rampage. The whole virus plotline makes no sense if we're assuming S31 understands the first frakking thing about Founder psychology. That S31 would do something so amazingly stupid and likely to result in disaster is the best argument against them. Their trouble is not that they are secret, or ruthless, but that they are incredibly stupid.