Most individual states would disagree, especially when the wholly-owned subsidiary exists primarily to avoid taxes.
If Amazon's technique was legally unassailable, they wouldn't be paying sales tax even in the 5 states where they already do. They'd just assign whatever creates 'nexus' in those states to new 'non-selling' subsidiaries.
Piercing the corporate veil becomes easier the more closely integrated the companies and their management structure are.
Amazon can maintain arms-length relations with most of their subsidiaries because those subsidiaries are not part of Amazon's core business, and can operate semi-independently with little to no loss in efficiency.
Maintaining such a relationship with subsidiaries directly involved in the day-to-day operations of Amazon's retail business (maintaining stock, setting prices, making sales, packing and shipping product, etc.) would be much more difficult, costly, and risky.
If Amazon's technique was legally unassailable, they wouldn't be paying sales tax even in the 5 states where they already do. They'd just assign whatever creates 'nexus' in those states to new 'non-selling' subsidiaries.