Foxconn does assembly and that is not a big cost of an iphone [0]. Like literally just a fraction compared to American IP, Taiwan CPUs, or Japanese cameras and the latter are all much harder to move compared to assembly.
[0]: https://www.businessinsider.in/tech/news/apple-iphone-7-and-...