> The obvious solution is not to hurt the economy as a whole, but rather for the government to lower the cost of high-quality education, build out social systems, and invest into onshoring select strategic industries by raising taxes at the high end.

You're proposing to tax an international supply chain. To tax something it has to be in your jurisdiction to begin with, and then you have several problems.

The most obvious of these is, what happens when the stuff just isn't there anymore? Suppose the US isn't competitive with China for manufacturing certain goods, e.g. because the US has a higher cost of living as a result of a purposeful housing shortage and then has higher labor costs, or for any other reason. So manufacturing moves to China, not just to sell to the US but also to sell to the domestic market in China and to Europe and India and the rest of the world. No part of those other transactions is in the US, so the US can't tax them and use the money to help the people in the US who used to be doing that manufacturing and selling those products to the rest of the world. Whereas if you sustain domestic manufacturing through some means then it exists and can make products to sell to the rest of the world because the fixed costs of establishing a manufacturing base can be covered by the domestic market and then it only has to compete in the international market on the basis of variable costs.

Next consider the industries where the US still makes stuff. You could tax those things because they're still in the US. But that makes the US less competitive in the global market for investment capital, which is highly mobile. If higher US taxes cause returns to be lower in the US than they are in other countries then investors go invest in the other countries instead, and then the thing stops being in the US. So that doesn't really work. You can see this in the case of e.g. Europe, which has even worse problems with the loss of manufacturing than the US.

Which leaves the activity where it's the other half of the transaction happening in the US, i.e. China is manufacturing something but the customer is in the US. That you could tax without a huge risk of capital flight, because companies can rarely change the location of their customers, but that still leaves you with two problems.

First, either of the countries participating in the transaction could levy the tax. In the case of China, then they can levy a tax (or some tax-equivalent) to only such an extent that it consumes the surplus in the transaction attributable to the competitive advantage of their country. China can do this because they have a lower cost of living etc., which doesn't work for the US. But because they do that, the US can't tax that portion of the surplus, which was the gain from moving manufacturing to China.

And second, a tax on imports is called a tariff. Which the US can impose to tax that portion of the transaction surplus that isn't attributable to the foreign country's cost advantage, i.e. the preexisting transaction surplus where it costs $8 to make something someone is willing to pay $10 for regardless of where it was made. But tariffs are the thing you don't like.