Wherever anyone wants. China benefitted by a compliant, cheap workforce, and has learned quite a bit, but they didn’t design the phones or the equipment to make them. If we pull out now, and end their piracy, China will be as famous for quality goods as Turkey or Argentina.
Frankly speaking, I know nothing about the quality of stuff made in Argentina, but Turkish manufactured good are on average of very high quality.
Regarding China, the quality of their products depends on the price you are paying. If you want a chair for $2 you’d get it, the quality would be according to a price.
I have to idea how you are going to stop piracy.
Regarding smartphones, check out Oppo. I have their at the time OPPO Find X3, my wife has IPhone 12. Mine is more technologically advanced. It even has a microscope in it.