That will never work because the powerful will lobby the politicians to add some new loophole.
The only solution is to NOT have taxes, NOT have a government and then the market is fair for everyone.
Unless you are into anarchy / voluntarism you won't like this solution, so keep enjoying your broken system with increasing inequality between the top 0.01% who colludes with the government and the rest - while the middle class gets their money stolen to pay for both rich and poor.
Not having a government is the same as handing you society over to robber barons.
Your solution would end with the reintroduction of feudalism as the only way that the rich and powerful can hold on to their wealth without it being plundered by the rich guy next door.
Markets can only be fair if everyone in the market has the same degree of financial power. This can never happen in large scale anarchies. The only chance of it happening is by having strong regulation.
If you don't your competition will.
We just need more spine in the country's legislation to close ANY loophole, because this wasn't illegal tax evasion, it was legal tax ellusion.
The point is that EU judged this unfair by Ireland and that effectively it stole revenue from other European counties to favor jobs in ireland.
Basically saying "you (country) can't have a lower tax rate than X" in our economic union.
Smaller countries with few industries would benefit disproportionately from bigger companies moving here the HQ.