I meant how he got most of Iberia, Freance, Commonwealth and the Balkans into HRE Princes, I mean I know its doable, seen it before, I just for the live of me can remember how its done.
For nations with fixed capitals:
1) Take a nation's capital province.
2) Add it to the HRE.
3) Sell it back to them.
For nations without fixed capitals:
4) Take their new capital province.
5) And any provinces that have higher development than their old capital.
Or you can always annex a nation, add their capital to the HRE, and then release them, that works too.
So this seems pretty easy to fix, then. Have culture shifting count development in state cores rather than just development in states, and change HRE removal on formation to always keep you in the HRE if you are the emperor. (Probably just the first half is mostly sufficient, but the second part will help bulletproof things.)
State cores are instant, and can exist within territories (see: diplomatic annexation), so you're 1) not preventing it, just making it more expensive in adm
and 2) actually making it easier because it removes the necessity of stating and then de-stating under some circumstances.
As for the second part, I'm not sure exactly what problem you're trying to address. The exploit, such as it is, isn't forming HRE, then adding territory back into the empire...because since you've passed all the reforms, there's no need to. The exploit being discussed is hotswapping between English and French, and is only possible to farm IA via because England is the
one remaining (okay, a couple RotW formations might not flag it, but most do) nation formation where the code checks whether you're an elector, but
not whether you're the Emperor, before removing your lands from the Empire. And as far as tag-switching away from HRE goes, I personally am glad that it 1) exists and 2) isn't easy. I feel like both of those make it a good thing, whereas only one would not.