In general, to be safe:
- Cut all ties with your home country, sell apartment, cancel all contracts
- No family in your home country (Wife, kids)
- Spend a maximum of 70-90 days per year in your home country, for example during the summer. You can't be there for example 3 days a week, all year around.
- Choose a new home base
- Make sure to have an apartment/house that you own or rent
Make sure to save evidence, keep a log of your travels, utilities, spendings. Make sure to have everything in check.
During the initial 5 years, the burden is on you to demonstrate that you are not residing in your home country.
Its important to remember that most people will fly under the radar and never have any issues, most people never hear anything from the tax-agency. But you never know.