Foxconn has an iPhone City of hundreds of thousands of people (something like 350k).
They make something like 200 million iPhones per year.
If you think that can be moved "just fine" then we will have to agree to disagree.
Producing something of the iPhone's quality, at the scale of a half million per day, every single day (that's 23,000 per hour, every hour, 24/7, for an entire year) is not something one can just pick up and move, even with Apple's resources.
It would take several years, if indeed it is possible at all. There are dozens or hundreds of managing workers at Foxconn who have been designing and producing iPhone manufacturing lines for a decade+, and I doubt China would give them and their families all exit visas to move to some other country to assist Foxconn and Apple in divesting themselves of the CCP's prerogatives.
This ain't Factorio.