It is mentioned a bit in other comments: be aware that in the country where you live, the tax authorities can argue that your 100% owned company in country X is managed by you. This means it is taxable in your country. It is then up to you to counter their point of view…
And they wouldn't be wrong.