There is also legal cheating that only works if there is enough money involved. For example, for German companies, a holding company in Malta with low corporate taxes - but it happens not to make sense for typical freelancers.
The majority state-owned (well̃, >30% federal state and >20% city) Frankfurt airport company has a holding... sorry, "management" company in Malta. Maybe they are doing just enough business in Malta to hold up to scrutiny. Most are based on no one looking too closely. But it's not a very meaningful difference. Heck, maybe I'd occasionally fly to Malta and work from there if that helped to "optimize" taxes like the big boys.
Or the Irish shenanigans of US tech companies.