Overall view: China's future exports may decrease however its overall value added component will likely continue to increase. For example, even today you likely have much more stuff from china lying around, and it would be almost impossible to realize that by value german products are still equivalent to about 60% of china's overall exports (very impressive for a country of 80 million vs a country of 1.4 billion). China should't fight tooth and nail to keep foxconn and phones. If you look at consumer trends, china needs to maintain dominance in scooters, electric skateboards, VR headsets, augmented displays, quadruped toy robots... and then pass that off to the indians/Vietnamese once the margins are squeezed. We should be disappointed if china is still assembling most of the worlds cell phones and laptops in 5 years, thats nothing to be proud of.
When you look at the direction that "scooters, electric skateboards, VR headsets, augmented displays, quadruped toy robots" are taking, these fields are going to leverage the same industrial supply chain that currently supplies smartphones/laptops.
So it is helpful to have a large smartphone/laptop assembly industry.
And given the rate of improvement we see in industrial robots and machine learning, it is feasible to see China continuing to assemble most of the world's smartphones and laptops, because of its entrenched supply chain which compensates for the higher costs.
Also remember that consumer product development only takes 3 months in Shenzhen due to all the hardware and electronics companies being in the same city, whereas it would take 9-12 months elsewhere. In the field of fast-changing consumer electronics, that is a huge advantage.