There's also that thing that made China what it is today - the USofA using China for cheap labour and a place to outsource all the dirty parts of high consumption.
China's moved on, US perceptions haven't.
Those dark EV plants were designed and built by engineers and technicians working 996 for cheap on an hourly basis.
China is capable of it due to the absolutely brutal grinding work culture. They're not superhuman, it's not Tony Stark building the Iron Man suit in an evening, they're smart and work extremely hard.
Very highly automated production lines (cars) have similarly moved along the labor-price gradient in Europe (~east) during the last decades, despite language barriers: You need some engineers, electricians, constructions workers, janitors, etc regardless, and those still scale with general labor costs, even if there's no human hands in the assembly line.
They are actually importing Chinese workers to their Brazil factory, leading to the slave labor expose by Brazilian authorities [0]. They have the same trouble recruiting in Thailand, where workers have functioning unions and enjoy modern working rights, instead of 19th-early 20th century Industrial Revolution type stuff.
[0] https://en.wikipedia.org/wiki/BYD_Brazil_working_conditions_...