I’d be very interested in reading a legal opinion on this specific topic.
For example here’s one article discussing just CA for several pages [1] which includes a provision where you have to file if you have sales in-state in excess of $500,000 or 25% of your total sales, or paid compensation in excess of $50,000.
It’s frankly an absurd situation even if you just wanted to figure out for yourself where you should file and how much you would have to pay. Paying someone to “do it right” nationwide would probably be a six-figure proposition. This is why, mostly, it isn’t actually ever done until you get past a certain size — maybe by 8 figures of revenue you consider possibly maybe dealing with it.
Presumably the same laws apply even to international corporations “doing business in CA”, not just domestic US companies.
[1] - https://sdcorporatelaw.com/business-newsletter/when-to-regis...