So why is so much tech stuck on the west coast then?
If it were that simple they'd have all moved (moved their operations and headcount) to lower tax areas by now.
This applies only to actual goods value (and doesn't look at capturing out-of-band transactions like online orders of virtual goods) but it's a really dead simple and easy to enforce law that'd kill a lot of tax dodging dead.
The real issue isn't that it's hard to tax these companies - it's that there isn't a significant political will in taxing these companies.
1. A voluntary international accord (that could be broken by any dissenting voices)
2. A single country setting the rules for corporate residency and enforcing them (i.e. the unilateral we don't need no diplomacy approach).
Instead I think the whole idea of primary residence for corporations is utterly unenforceable - I think what countries need to start doing is levying appropriate VAT taxes on added value to companies and possibly force all domestic activity to be executed by domestic labour only. I think, if we actually fixed the loopholes around international tax dodging, we'd be in a position where countries would be quite aware of how much value they have over a given company (i.e. Apple might derive 60% of their value from the US) and then use that proportionality to leverage political pressure on companies as needed.
And, just to clarify, this is essentially the road the CCP has taken and precisely why they seem to have such an outsized amount of control over companies - every country other than China is voluntarily declining to flex their muscles.
The barrier to move HQs and the like is so insanely low for large corporations that companies will gladly do it for even the most marginal tax benefits - a company might even consider hosting a "beauty contest" where they try to get cities to outbid each other in a sick game that deprives everyone of their tax revenue. Of course such an act (both on the company's side, and on the side of cities who decide to participate) is a clear signal of moral bankruptcy - but that's no surprise since America considers cheating other people to be the greatest virtue.