You should Google "Place of effective management"
A lot of the entrepreneurs I meet become tax & social insurance fraudsters as soon as I mention this, because they think they can setup a company somewhere but live in Spain, without paying or registering companies here.
yes because you are handling 100s of milions and you are some sort of public face then you get targeted.
But if you are some noname making maybe up to a few mils per year income, nobody is going to chase you and prove you are avoiding local taxation. You are always "in a short holiday trip" :).