i remember that an earlier version of civ had such a penalty when you changed production to something else. i think it was 50% and civ2, right? obviously the idea of prebuilds is now an intended concept of the game and nothing that was overlooked, otherwise they would have kept the penalty or would have disallowed production changes, like in the cases of disband or forest cut shields that you cannot change into a wonder build.
trading away a ressource is another proper tactical way in my eyes, as, again, you do not build the unit for 20 turns. so there is a tradeoff. (i still would hardly trade the ressource away for the sole reason to build obsolete units, but really use it for trade bait.)
what i dislike about disconnect-connect is that you avoid the conceptual tradeoff.