Somebody over at Trekmovie.com
(post#344) has put forward a theory that surprisingly might work...
In Star Trek (2009) Kirk watches what we all assume is the Enterprise being built on the ground. What if, instead, it was actually Robert April's being dismantled and broken up?
That allows a starship to remain constructed in space at a dry or space dock facility. But establishes they are brought down to a planet surface to scrap down for their component parts.
The NCC-1701 registry number being carried over from one ship to another, still presents a problem however. Especially if you consider starship numbers to progressively get larger as time goes by and the Constitution as 17 (or 18) models away from the NX class. The commissioning of April's Enterprise wouldn't be long after the destruction of USS Kelvin NCC-0514. However that class of ship could always have been a few decades old in 2233.
Perhaps if an earlier starship has merit, the name and registry number can be inherited by a later class. So you get the USS Constellation NCC-1017, a Constitution class with an earlier number... because there once was a 10th generation starship that did something historic that special dispensation granted the name and number came together.