No, you've got it totally right. I'm virtually certain that you get full credit for the cost of lower level buildings of the same type so if you build a Manufacturing Center on a tile that had a Factory then the production cost of the Factory is subtracted from the cost of that Manufacturing Center and that's what it costs to upgrade.
I think that this applies even if you upgrade a new type of building on a tile with a previous building but if the types are different you might not get full credit but on the other hand you might get full credit even then.
Even if your intent is to build a Manufacturing Center from scratch if you're able it costs the same to build a lower level factory first and then upgrade it but because you'll get the lower level factory earlier and it will actually speed the construction of the Manufacturing Center that will be upgraded over the top of it then you come out way ahead.
Regrettably, the only thing you could do in DL is to have the lower level building already under construction and then have turned off auto upgrade on all your planets then you could continue to finish construction of the lower level building before later manually scheduling the upgrade. Or you could wait until you get the tech and then manually kill the upgrade. Either way this is not real practical and it doesn’t help you for anything you want to start after gaining the tech that enables the new building.
However for DA and TA you can do this and most likely should.
Another somewhat related point is that there are probably some upgrades that are *never* right to do. For example Industrial Sectors. A number of people (myself among them) think that Industrial Sectors cost way more than there worth for the minimal benefit they give you over Manufacturing Centers. That’s not to say this applies in all games under all circumstances but there are many times where I never want Industrial Sectors and so I try to delay them until I’ve constructed all of the Manufacturing Centers that I want and then once I research the tech I go in to all the planets and manually kill the upgrade.