You wrote "If I were to move abroad and have my primary residence in a house I will later sell I would have the primary home exclusion without risking my status in the US when I am a resident." If you move abroad and no longer have your main home in the US that US residence will not be eligible for an exclusion unless the sale is less than three years from when you move; because you must occupy that home as your main home for at least two of the five years prior to sale.
Being a resident or a citizen has no bearing on the exclusion rather it is based on ownership and occupancy as your main home. Once another home has been your main home for three years any sale of the former main home is fully taxed and no gain can be excluded for citizens or residents. This may be a consideration for when you sell as compared to when you move.
You are correct that you cannot claim the exclusion if the expatriation tax
applies to you. If you have substantial gain you plan to exclude on a sale less than three years after you leave the US then that factor alone may be enough to decide not to expatriate while you still own the home.
The general rule is that nonresident aliens
and foreign corporations are subject to United States income tax laws
only under limited circumstances. A citizen or resident alien of the United States is subject to US tax on worldwide income.
Since the original question was in regard to expatriation of a citizen as compared to expatriation of a citizen and the filing requirements for each; I am stating that being a nonresident alien will generally result in less income being subject to tax.
That is, there may or may not be provisions in the treaty that exclude income from taxation
to the citizen.
Tax treaties can modify those general rules
; but this happens in different directions, so to speak, for the nonresident alien and the resident. That is, for a citizen or resident of the US all is taxable unless excluded by a specific provision whereas for a nonresident alien nothing is taxable unless included by a specific provision.
My recollection for Germany and Italy is that there is not any difference for a US resident as compared to a US citizen.
Hope this clarifies for you even though it is advisable for you to confer with a practitioner that can get all the facts of your situation to analyze how the tax treaties may affect you, depending on your immigration status.