Perhaps those goods shouldn't be made in China, an ocean or two away from where they are needed, under lax emissions laws. If we held China to the same standard as the US and EU, some of that problem would go away. It wouldn't just make fly-over country happy. Huge container ships do not run on solar power. They burn huge amounts of heavy fuel oil, which is nearly tar and not too far from being coal.
China can be so cheap because everything is in the same place. IC production, PCB production, them being combined, device assembly, etc.
It would be far more expensive to ship all the parts separately.
Even more expensive to just ship the raw material from china to where it is needed.
And with expensive I mean both in terms of climate and money.
Moving any part of the supply chain tends to encourage the other parts to move. If part production moved, then both mining and device production would have an increased incentive to move. If mining moved, part production would have an incentive to move, and if that moved then device production would have an incentive to move. It all works both ways, with suppliers and customers tending to move toward each other.
So yes, we can put everything back in the USA, and it can be affordable, but we face an uphill battle. The battle is only lost if you give up trying.
So, how are you going to mine stuff in the US that the US has no resource deposits of?
I want to see you move rare earth production into the US.
Another big source is fly ash, which we get from burning coal. This actually has a decently high concentration of the more urgently needed elements. The more coal we burn, the more fly ash we have. Burn more, and get rare earth elements as a bonus.
The amounts needed are tiny. The only trouble with importing from China is that China considers control of rare earth elements to be part of a strategy to dominate the world. China restricts exports, and threatens to restrict them more. This is of course a national security issue for every other country in the world.