This is true I remember Robert Hewitt Wolfe saying that, the Dominion had the Federation in their sights for a while, it was the wormhole that sped up their confrontation.
The dominion - as per the scenarists' intent which was not established on-screen - may have been planning to invade the alpha/beta quadrants from the beginning.
But our characters are not omniscient - as such, they could not know the extent of the dominion's plans from the beginning ('the search') - or the fact that the dominion will find a bridgehead as convenient as the cardassians, enabling it to launch the war.
And these are some unacceptably large speculations to make.
Well the Federation knew the Borg were on their way too and really failed to prepare for them. And it was a goor three years before the war started, DS9ers even stood there watching the Dominion fleet coming though the wormhole and did nothing. The desperation in the final stages of the war was the fault of poor planning and allowing the Dominion to establish a beachhead in the AQ. So they didn't need to be omniscient just smart enough to know what was going to happen.
About the Dominion:
The federation found out the dominion was xenophobic/hostile.
Well, most other super-powers in the alpha/beta quadrants are xenophobic/hostile - romulans, klingons, cardassians, tholians, etc, etc. And shooting war with them was avoided for hundreds of years (with the exception of the romulans).
That's a pretty good record;
the federation can rightfully claim it knows how to handle aggressive neighbors.
At first, the federation could also assume that the dominion was no stronger than the romulans/klingons. Later, this perception was, indeed, corrected.
And there was one other CRUCIAL FACTOR:
The federation could collapse the wormhole at any time, thus ending the conflich before it even began.
Why deny the riches of the gamma quadrant ab initio by collapsing the wormhole when you could do it at any ulterior time?
Indeed, in 'By inferno's light' (in time to prevent the dominion invading), the federation wanted to do just that.
The actions of the changeling impersonating Bashir - eliminating the collapse-the-wormhole-option - could not be predicted as probable by the keenest strategic minds. And they represented, indeed, a HUGE failure of federation counter-intelligence.
After the changeling Bashir stabilised the wormhole, the dominion sent large convoys through the wormhole at a breakneck speed, and the federation had no viable option for blockading the wormhole until Rom designed his law-of-conervation-of-energy-breaking mines (which is a HUGE discovery); when it had Rom's discovery, the federation immediately blockaded the wormhole.
In conclusion - the federation could not reasonably predict that the dominion will be tougher to handle than its centuries-old neighbors; could not reasonably predict that it will suddenly lose the option of closing the wormhole.
As such, any apocalyptic claims about the dominion invading/being able to invade prior to 'By inferno's light' were just idle speculation.
About the borg:
The federation's failure to prepare for the borg represents either criminal stupidity or criminal negligence or both on the part of starfleet/whomever else was in charge of the federation protection.