You might be able to get some help on our expartiates sister site (?) Or, possibly, even on personal finance & money.
If it helps any, I worked overseas for "several" decades - USA and multiple European and Asian countries.
I know of know country that does not follow the rule "if you live here, we are taxing your worldwide earnings". That's for individuals, who are generally considered to be resident for tax purposes after 183 days in any country.
It's a different matter here, though, as you intend to open a company in Estonia, so the company and you are two separate taxable entities.
Unless you are Google or the likes, that Estonian company will pay taxes in Estonia (and you will pay taxes wherever you are resident).
The bottom line here is that, sooner or later, you are going to need an accountant.
Make it sooner.
Find yourself an accountant, and I highly recommend one with experience in similar setups. I have always been freelance, and have worked over 15 countries, always tax resident. Every dollar I have paid an accountant has brought me back $10, if not $100.
An experienced accountant will give you invaluable advice (might even help set up the company, although you ought to be able to buy one off the shelf). He will tell you how best to balance income to the company and to yourself to maximize retention given the two tax rates. He will also advise on pensions, allowable expenses, and other ways to legally minimize your tax burden, as well as filing the legally required documents for you.
I strongly advise you to set up a limited company (Ltd, GmgH, et cie), and not to be self employed/sole trader.
Btw, you left out one major piece of information
I'd like to open a software company in Estonia
will the company have employees other than yourself?