Timo, you're missing the point that the Cardassians played a major role.
The Cardassians although not a major player in the Alpha Quadrant was still a force to be reckoned with, they had wars with the Federation which lead to the creation of the DMZ. The Klingons war against them hit heavy resistance.
Maybe. Then again, no Cardassian ship ever seemed to pose a threat to Picard - or even Sisko, once the latter got rid of the Cardassian junk he originally had to use for fighting the Cardassians... Picard (or Worf, manning Picard's guns) was more concerned about the Talarians, even!
Cardassian shipyyards already existed and no doubt began construction of bug ships whilst new shipyards were built or upgraded.
Indeed, the large dockyards Worf destroyed on his "mission of penace", as well as the ones our heroes infiltrated to get to a Breen energy damper, seemed like Cardassian designs, probably built before the war (even if later boosted by Dominion tech).
Another reason the Dominion seemed to build ships faster was because their ships were smaller.
Then again, the Dominion also built much larger ships than the Alpha powers. And apparently way faster: we saw that single battleship in "Valiant", then at least half a dozen more in "What You Leave Behind", whereas we have no evidence that the Feds ever built another
Galaxy or
Nebula during the war. All Federation ships save for a few
Defiants had registries dating to the prewar days... And, if registries don't convince, were all of prewar designs, too.
Timo, in addition to what I Am Legend said, I'd like to point out that the dominion tried to blow up the BAJORAN SUN, not only destroying a large allied fleet, but killing BILLIONS OF BAJORANS.
The fact thet the federation didn't mine the wormhole and declare war on the dominion in the next second can only be described as pacifism taken to such an extreme that it becomes suicidal/idiotic.
...Of course, it could be that the Feds had a reason for playing for time. If they can't build new starships in time for the war, they'd better make sure that they pull back every single vessel they can from deep space assignments. And that might well take the full two years the Feds stalled before going for broke.
It's just damned bad luck that the fleets only reached striking strength after the Dominion had gotten significant forces through. But that was a carefully staged and timed little play Starfleet played there. By mining the wormhole at that specific moment and not a day earlier, they ensured that their ships would be ready to pounce on Dominion dockyards, at the exact time when the Dominion
had to send its ships to stop the mining of the wormhole.
Timo Saloniemi