Well, you might say the Enterprise NCC-1701 went through so many odd situations and took such beatings in battle that it could explain why Starfleet retired her early. But if Voyager can be kicked back and forth like a football and be back at 100% capacity next week without a Starbase around, that argument only goes so far...![]()
Well, Voyager did have access to more advanced technology and automation compared to the 1701.
Discovery showed us SF does use robots/automation to repair ships internally and externally (and those would probably exist on Voyager too... just unseen, or the work in question was taken over by a computer in a way that doesn't require use of robots at all - and why would it next to tractor beams and more advanced transportation technology?).
In real life, humans often think that automating jobs would require robots with human like bodies to do the work... whereas in fact, you don't really need those at all... or you need only a minuscule amount (compared to relative number of human bodies that are usually needed). The huge portion of work/jobs can be done by algorithms that don't require... 'limbs'.
Replicators can either fashion new materials entirely out of energy, or they can use pre-existing matter (such as damaged hull plating), dematerialize it, and rematerialize undamaged one for a small energy expenditure.
Voyager could have also harvested a bunch of raw materials from practically any star system or stellar matter in general, shoved it into the replicators and converted into energy for later replication or storage.
Omicron particles can augment antimatter supply... so its possible the crew found new sources off screen.
This is how you can get around the issue of Voyager having more torpedoes than it should have. The crew would have found other options to augment antimatter or they would fashion its own with a couple of weeks of layover in an uninhabited star system (and for all we know, use solar power to power replicators so they can fahsion whatever is required).
With the 1701-A Constitution being retired early... well, there could be different reasons for that.
Starfleet was entering a new age of starship designs with the introduction of Excelsior and Miranda class ships for example... so its possible older designs like the Constitution were not deemed 'viable' for that... whereas the Excelsior and Miranda class were designed from the get go with more 'flexibility' in mind and survived for long enough in large numbers to allow science and technology on UFP side to adapt new technology to older designs and keep them on par with state of the art ships (and this would eventually also allow their spaceframes and ship structures to be reconfigured as time goes by).
The Constitution class was retired before then.
The NX-01 was being retired after a decade of service... which might make sense due to new influx of starship designs from a merger of 4 species into UFP, and the solely Earth designed ship might not have been deemed 'fit enough' to be outfitted with most of the new technologies (some could extend its operational life span yes, but it wasn't flexible enough to allow it to survive for longer).