Tolerating the violating of foreigner's IP laws, which stand in the way of progress, is one of the things that helped enable their success.
Right now China has progressed to the point were things that are done by the Chinese simply cannot be duplicated anywhere else on the planet. It's not just a matter of scaling their production... They are simply the only game in town. You CANNOT do what they do in China anywhere else.
It's no longer a issue of cheap labor. They have innovated their way past their competitors in USA and Europe.
The part where China falls short is quality control. In the mad rush to produce goods at the cheapest price possible they habitually cut corners and undermine their own foreign markets.
When USA and European companies use China to produce high quality goods they just have to have people on-site to ensure quality and use robust post-production testing. Otherwise things tend to go sideways. Right now places like Japan, Germany, and Korea have a slight end in quality, but for most purposes it's a wash.
The biggest threat to the Chinese economy is their own government policies spiraling the place into a massive depression.
It's worth noting that Panasonic does a lot of it's lithium battery manufacturing in China.