1. What it actually is
Wegzugsbesteuerung (§6 AStG) is a fictitious sale tax. If you have held substantial shareholdings in a corporation (≥1% at any time in the last 5 years) and you stop being a German tax resident, Germany taxes the latent capital gain as if you had sold on the day you moved, even though no money actually changes hands.
It applies to shares in corporations (AG, GmbH, foreign corporations), not directly to ETFs, partnerships or operating sole proprietorships. The tax rate follows the normal partial-income (Teileinkünfteverfahren) rules for capital gains on substantial shareholdings.