I knew people doing this without reporting their foreign company income to their local tax authorities, but if they catch you you're looking at severe fines and possibly jail time. I knew a British guy living in Sweden making money from his UK company without fully paying Swedish taxes on his gain from the UK. He later got slapped with a equivalent ~80k Euros fine by the Swedish tax authorities. Turns out, governments don't like you cheating your tax dues.
Legally avoiding taxes in the EU is pretty difficult for the average person without completely relocating to a tax heaven.
So be careful and hire dedicated tax attorneys with experience in international/EU tax laws before you think you're clever and dream of dodging taxes like you're Amazon all on your own.