What is needed is for there to be multiple competitive and diverse fungible product sources to get redundancy. It is sort of an extension of a competitive market. Production insufficient for complete demand to be supplies by one softens the blow as it becomes half needed capacity. So if say China produces half of our screws then cut off results in a shortfall by half instead of a complete cut off.
The thing is that these dependencies are a feature and not a bug on several levels, both in terms of trade promoting peace and the efficency involved. Put the should we philosophical questions aside and there are a few precedents to look at and hypothetical solutions.
One way is through subsidies for deliberate overproduction are the way done for food - but that is also a market where the fungibility and nutrition encourages varierty to some degree. Again it is inefficiency by definition - generally done for things where it is believed/claimed to be better to have the waste than running out.
Another is in "national security" pork where it is often more an accident of the pretext than neccessity. Needing American screws for DoD gear.
Some sort of international robustness treaty/trade deal could be devised per sector that say any country may subsidize or tarriff industries up to say N% of their basic demand but once it gets beyond that they need to stop or start tapering off, perhaps with varied threshholds. That would no doubt be a bed of weeds as everyone tries to privledge their own interests and plays games with classifications.