Apple Ireland "holds the rights to all of Apple's I.P."
Solution is trivial. Can be implemented tonight.
Apple 'Wherever' exports their profits..., I mean "submits a royalty payment", to Apple Ireland for use of the IP.
Apple 'Wherever' are importing 'Rights'. The nation of 'Wherever' can slap an import duty on imported 'Rights'. Payable at time of import, or triple if discovered later when the books are audited.
Such Import Duties can be slapped on immediately, starting tonight. Governments do exactly that during Trade Wars; instant duties and import taxes. Overnight.
This Tax Avoidance scam is a solved problem. See above. Done.