For what it is worth: The OECD has made a lot of changes to their transfer pricing guidelines, and starting in 2018, individual countries have a lot of leeway in re-assigning profits to other jurisdictions. The effect is not fully felt yet because the new guidelines are not evenly applied, but a friend of mine (who spent most of the 2000s building aggressive tax structures for multinational pharma companies) has spent the last few years mostly unwinding the aggressive structures again, in reaction to the OECD changes.
If you are interested in the details of this, Google "OECD BEPS transfer pricing"; it is quite a fascinating topic.
On a side note: The same updated guidelines, when misapplied by an aggressive tax authority, can cause all sorts of headaches for fully-distributed, fully remote companies, and the extent how this can cause trouble is underappreciated by the startup scene.
If you are interested in the details of this, Google "OECD BEPS transfer pricing"; it is quite a fascinating topic.
On a side note: The same updated guidelines, when misapplied by an aggressive tax authority, can cause all sorts of headaches for fully-distributed, fully remote companies, and the extent how this can cause trouble is underappreciated by the startup scene.