Let say I am a junior SWE in EU. I incorporate in Estonia and issue my employer with an invoice from said company. That company pays for my house, my car, my dental service and whatnot, and what's left I take as a employee salary.
I pay local tax for that salary, but that's only a fraction of what I've billed my employer.
There's also the CFC rule, which means that within the EU, if you control a foreign corporation, your country of tax residence can tax undistributed profits.
Often tax offices don't bother and you might not get caught, but 'not getting caught' is not the same as it being legit.
Until you get audited by your local tax authority who rules that all of that is disguised salary, or the Estonian tax authority says that that's technically (taxable) profit being paid to the director.
If you're currently doing this, I suggest throwing yourself at the mercy of your local tax authority with the help of a lawyer and an accountant, as it's possible they'll show some leniency if you go to them first and not add penalty fines in addition to needing to back-pay the tax and late payment fines.
You've got to get up pretty early in the morning to fool The Revenue.
You'd be far better-off jumping between countries to leverage the 30% ruling/Beckham Law/HSM tax arrangements if you can.
Cautios when dealing with German tax officers: They are checking the 183-day-limit very very strictly, includin invoices/bank statements if required, hotel bookings etc. They even apply intelligence colleagues if in doubt for big fishes.
https://www.vlh.de/wissen-service/steuer-abc/183-tage-regelu...
So OP has to clarify on both layers: natural person himself, legal entity, and the relation between them. And the result is affected by the questions OP raised?
It is only when he decides to withdraw the money the problem occurs.
What you're saying applies to most EU countries. Here where I live you have to reside for majority of the year in given residency to pay taxes over there.
Here's the tricky part.
Estonia is part of Schengen Area. Which means you can travel there and back without passport. There's no paper trail of your arrangements. You can easily create a reality in which you reside there for majority of time.
But again, that's not the selling part of Estonian LTD. Which is - it's extremely easygoing and as long as money stays in the company you're not paying taxes.