The original Enterprise NCC-1701 was constructed around 2245 under Captain April. April commanded her for a 5 year mission. Captain Pike then commanded the ship for at least 10 -11 years. The ship would be at least 15 years old prior to Kirk’s command.
Captain Kirk then commanded her for at least 5 years and at the end of his 5 years. The ship was at least 20 years old. Captain Decker took command of an extensive refit of the ship lasting 2.5-3 years. I assume the life expectancy of a ship is anywhere between 40-50 years old. She was already mid-life when we saw the major refit. Sources state that the 5 year mission ended around 2270, and the Motion Picture (TMP) occurred at 2273. This is based on Decker’s statement that Kirk had "not logged a single star-hour in the last two and a half years
" and Kirk's line. After TMP, the Ent carried the flag of Admiral Kirk, with Spock as its commanding officer when Kirk was fulfilling his admiralty duties.
By the start of The Wrath of Khan (2285), the Ent had already been in service for 12 years post refit and was at least 35 years old. Kirk was not in command of it anymore, and Captain Spock was commanding it for cadet training. Ship was likely too old for exploration, and likely regulated to federation territory. By this time, the federation had already developed many ship designs on the Constitution family including the Miranda class, Constellation class, and Soyuz class. The Constitution family was likely older than 40 years old. They also had science specific vessels such as the Oberth class, and were developing the Excelsior family of ship designs. The damage of the Ent post battle with Khan was also likely so extensive that resources required to repair the ship could be too extensive.
At the end of The Voyage Home (2286), multiple sources stated that the Ent-A was a renamed ship, formerly commissioned as the Yorktown NCC-1717. It was likely a few years younger than the Ent, maybe 2-5 years younger. Background communication in the movie stated that the Yorktown was severely damaged while encountering the probe. So let us assume that it’s 30 years old. In the Final Frontier (2287), it took a year to repair its systems and broke down during its shakedown cruise. By Undiscovered Country (2293) the Ent-A had already completed at least 5 years and could easily be 37 years old or older. Excelsior class vessels had already started full deployment, and the Ent-A just barely survived a battle. Furthermore repairing the ship, or upgrading it may require delaying production of Excelsior class ships, and development of Ambassador style test designs. So Starfleet likely decommissioned the ship or recommissioned it as a museum ship.
As for the USS Ti-Ho argument, if we accept that argument, we would have to accept that the Constellation class ships were in production for over 40 years as exploration vessels. I believe that’s unlikely as Excelsior class vessels would take its place as exploration vessels. There was also only one source that gave weight to the Ti-Ho argument. In my opinion, refitting the Constellation class was more of a stop gap before new generations of explorer size ships were in commission. Look at DS9’s “Homefront,” the USS Lakota was a refitted Excelsior class ship. It was at least the third major refit of the class since production, and after 80 years of service. It likely stopped serving exploration duties and was utilized as diplomatic duties. At that time, the Galaxy class was in mass production, but mid-size explorer size ships were in need and the Sovereign class ships had not gone into full production. The refit was utilized likely to extend the ship’s line before it gets phased out for a newer class.