The loss of 39 ships at Wolf-359 and Shelby's "we'll have the fleet up and running in less than a year" gives some idea about the Federations ship production capabilities in peacetime.
Or perhaps ship reassignment capabilities? We might note or ignore the presence of many study models of TOS movie era (or even older) vessels among those lost, and speculate that (most of) the destroyed ships were bottom-of-the-barrel junk that typically floats around Earth - and that Starfleet in the aftermath of the battle would want not only to compensate for the number of ships lost, but also to reassign actual combat forces to the vicinity of Earth, in a radical change from previous policy.
I suspect that huge numbers of Excelsiors and Mirandas were put into mothballs (or more likely ready reserve) and kept in combat ready condition in case of time of war, when they could be deployed quickly and manned by minimal crews.
This is certainly a possibility. The other one is that those ships remained in constant operation, just like Klingon ships of old design appear to serve through decades and centuries. We never quite got the impression that the peacetime TNG Starfleet would consider either Miranda
outdated or useless. Admittedly, the first class was seen in "secondary" tasks only, and two were present among the Qualor II junk - but the latter class was always seen busily serving next to the Galaxy
class, and even receiving experimental updates to its drive systems that were only later given to the E-D ("Where No One Has Gone Before").