A more probable scenario would involve a specific Fleet tasked with Earth defense forming the bulk of the response, but random ships also forming a significant part because the 3rd Fleet or whatever would be at a peacetime stance and not up to the DS9'esque strength of 300 immediately available ships. Scattershot losses to other fleets would not warrant comment, but the loss of 40 out of 300 for the 3rd Fleet would be an issue.
In any case, 40 ships
wasn't a big deal in TNG. In VFX terms, showing four lit and mobile ships was the absolute maximum, and the writers realized this would not suffice - so they wrote around it, having e.g. "Redemption" show those four ships, feature a graphic of twenty-plus, and then include dialogue establishing that the twenty-plus were a pittance that makes the Romulans wonder why Starfleet isn't sending more of their ships.
Heck, 40 ships wasn't a big deal even in terms of "BoBW", hence the lighthearted comment at the end. A tragedy, yes, but a single police officer brutally slain doesn't mean the NYPD is powerless to prevent crime till next New Year.
Additionally, with the "fleet back up and running in a year" comment: Exactly what ships were the replacements?
Might have been mere reassignments, since it appears it takes longer than a year to build an individual ship (we certainly never heard of faster construction in DS9, save for the Mirror
Defiant, and we never saw recently built ships, save again for a
Defiant). Might have been nifty and modern-looking ships that were all sent elsewhere, away from Bajor which was an inactive front just like Washington/Richmond - or then the scene of suicide attacks where expensive units might be held back or then only used as a silver-bullet "
Galaxy Wing" that stands ready to escape at the first sign of trouble and leave the cannonfodder relics to die.
What springs to mind for me are the low 1XXXX and 2XXXX registries for the Ambassador class, and the high 3XXXX registries for the Miranda class and the 4XXXX registries for the Excelsior class, when the former is clearly a more advanced design than the latter two (although there is a convoluted reason why this is so.)
I'm not so sure about the more advanced bit - the
Ambassador just looks like a bigger
Excelsior, but with a throwback secondary hull more akin to Kirk's ones. There could have been a "generation" of ships featuring a first wave of all designs but successive batches of only certain smaller, attrition types.
The same doesn't appear to be the immediately evident case with the "generation" involving the likes of
Steamrunner or the one involving the
Galaxy, though - the second coming of
Galaxy lookalikes might still be in the future, but where's the second coming of those dark and angular
Steamrunners and
Sabers? (Well, the
Saber numbers actually are high enough to put them in the rehash category if we wish to read them that way.)
Timo Saloniemi