I suppose there were always three alternatives when an engine needed rebuilding: rebuilding the original one, replacing it with some other, previously used, engine, or getting a new replacement engine from the factory. The replacement engines came without a number and the installer could punch in the original engine number (which presumably many did, and so those cars only appear to have the original engine when in fact they do not). Also when another, used (usually sedan) engine was installed, either rebuilt or not, the installer could elect to grind off the original number and punch in the number that was on the original Pagoda engine, something that can still be done today.
Rebuilds can be anything from disassembly, inspection and replacing just a few parts, to replacing everything possible. For example: does one keep the pistons and only replace the rings, or replace both; only grind the valves or replace them; replace or not the crankshaft and camshaft? Sometimes someone will say that the engine was rebuilt when they only did the head and not the block. In any case, there are various tests that can be done to determine the condition of the engine (compression, leakdown).
And it would appear to me that, in days gone, it may have been cheaper to order a new engine from the factory than rebuild the original one, because there are just so many replacement engines around. At least a few years ago, new engines were still available from Mercedes, but they cost close to $30,000 so it's definitely cheaper to rebuild an existing one. It seems like in the old days the price differential was reversed - but is there anyone who has actually ever bought a new factory engine here who could confirm this?