Plus Starfleet is large enough and powerful enough that it can defend an empire 8,000ly wide
Starfleet isn't 8,000 light years wide... that would take much too long for ships to get anywhere. That figure is 8,000 cubic light years... as 200 X 200 X 200. It makes more sense that way, as DS9 was on the outskirts, and the core was only 50 light years away.
I know the war didn't start at the same time as the Borg invasion, but the pact with Cardassia in "By Inferno's Light" was before the Borg "incident" so they knew it was coming.