The U.S. probably does have the sophistication, talent, and infrastructure to make the iPhone, if price was no object.
For things that are economical, which mostly means low ratio of employee-hours to value of the finished product, the U.S. does a reasonably good job manufacturing them, which is why U.S. manufacturing output by value is the highest in the world.
China actually imports a substantial amount of the machinery it uses in its factories from U.S. factories, which are fairly competitive in the meta-factory category of building industrial machinery for use in other kinds of factories (China annually imports about $20b in industrial machinery from the U.S.).
For things that are economical, which mostly means low ratio of employee-hours to value of the finished product, the U.S. does a reasonably good job manufacturing them, which is why U.S. manufacturing output by value is the highest in the world.
China actually imports a substantial amount of the machinery it uses in its factories from U.S. factories, which are fairly competitive in the meta-factory category of building industrial machinery for use in other kinds of factories (China annually imports about $20b in industrial machinery from the U.S.).