Automated shipyards are not beyond Federation technology. Instead of one system those ships could be produced in hundreds simultaneously. The ships don't even need to be crewed. Was the Dominion going to prevail against 30,000 Mirandas controlled by M5 or better AI?
Tell that to the morons who made Ds9 in the first place.
Have you seen the amount of technology that was dumbed down for the sake of drama?
Just how much they had to make the Federation 'underpowered' for the Dominion to be able to challenge them in the first place.
I'm hardly saying the Federation is 'all powerful' but we never saw its fullest technological prowess at play (in most cases, it was dumbed down), and the writers were too dumb to present it properly given the difficulty they had to even imagine such a world (even though OURS is relatively close to Trek in numerous respects when it comes to technology alone - numerous people in real life [writers included] aren't even aware of what our real technological potential was decades ago, let alone today).