There's better ways to do it then, EU don't have that problem for example, and we buy plenty from China.
We just have safety and security standards enshrined into law, and don't deal with anyone that doesn't agree to follow them.
It's why some products have the C€ symbol on them, which is "this has been imported, and meets all legal requirement", and all shops are not allowed to sell anything without that cert if imported.
(Though this don't apply to direct-to-consumer delivery from other nations, so it's not bulletproof)