In an ideal world, I would prefer most every bit of code was written with your fifth replacement in mind.
This means that you've taken the time to document what you've done, test what you've done, and even included any relevant design and architecture concerns for why you have done it.
Without this information, your fifth replacement is likely to have many frustrating "why did they do that this way?" reactions which sometimes will lead to rediscovery of exactly why when they try to remove or change it and are confronted with the context.