Why wouldn't these classes still be in service? I assume planned obsolescence isn't a part of starship designs, these things are made from materials that don't rust or decay and if a freighter is doing fine delivering goods in a monthly trip in the 23th century the same ship would be fine doing the same thing in the 24th century.
Starships aren't cars that need to be fashionable so they need to be updated every few years and besides that, even a car from the 1920's can still putter around just as easily as it did a century ago.
New Materials for core structures on StarShips are bound to come about as Material Science improves.
e.g. The Materials we have access to now for building a house is so much better than what we had in the 80's / 90's.
Using new Materials in the core frame of StarShip construction can make a critical difference over the long term.
New Hull materials, new layouts for deck efficiency.
Some design changes might require strict "Physical Changes" to the core structure of a StarShip based on knowledge learned.
The USS Defiant lasted longer in battle because of it's "Ablative Hull Armor", even against a upgraded Excelsior class.
Imagine Future Upgrades on all StarFleet StarShips:
- Now imagine if EVERY single StarShip had "Ablative Hull Armor" in the base hull + new technology like Ablative Hull Generator on top of the Base Hull that has it's "Ablative Hull Armor"
- Now include the Conformal "Shields" on top of "Ablative Hull Generator" emitted from the etched lines on the hull. These were the "Shield" configuration where the Shield layer was only a few meters away from the hull and hugged the surface of the hull.
- Then add in a second layer of "Shields" that is emitted from the Main Deflector Dish
You can set this to create the Ovaloid "Bubble Shield" from TNG that we know and love.
= (Now you have 2x Layers of "Shields") where if something passes the 1st layer, the 2nd layer will catch the remainder of the energy that penetrates.
- Now you stack on "Quick Recharge" by taking down the Shields and refill the Shields to 100% in 45 seconds thanks to the Nova Class. But apply that feature to every StarShip with Multiple layers of Shields. That would make ships "Harder" to kill because you have to take down a StarShips "Shield" within a small window of time.
New Safety Requirements in terms of layout may come about due to knowledge learned in field on older StarShips.
e.g. IRL of a similar critical change:
https://en.wikipedia.org/wiki/Germanwings_Flight_9525
In response to the incident and the circumstances of Lubitz's involvement in it, aviation authorities in some countries (including Australia, Canada, Germany, and New Zealand) implemented new regulations that require two authorized personnel to be present in the cockpit of large passenger aircraft at all times.[4][5][6][7] While the United States Federal Aviation Administration,[g][11][139] the Civil Aviation Administration of China[h][140][141] and some European airlines already had a similar "rule of two" requirement, the European Aviation Safety Agency recommended the introduction of similar legal changes.[6][142] Other airlines announced similar changes to their policies.
We in the US and our FAA always had the "Rule of Two" when it comes to the cockpit. But the Europeans never had that "Rule of Two" and because one of the pilots had psychological issues, he forced the plane to crash into the side of the mountain killing everybody on board deliberately.
9/11 forced crucial cockpit design changes, but that change also caused issues where if you didn't have good protocols in place, a possible worse case scenario could occur which did occur.