I suspect the following might be a big part of the secret sauce:
a) Having a culture where EE work is more prestigeous than software work, leading to smart people going there.
b) Having spent decades on scaling up the national university system for engineering educations, starting from the 80s electronics design/manufacturing boom.
c) Having a low salary level, internationally speaking.
The combination of a large, smart and affordable work force for something like this is pretty hard to beat.
[0]: https://nos.nl/artikel/2280228-wat-heeft-de-chinese-overheid... (in Dutch)
Even if you have a masterpiece in your possession to try and copy, you will fail.
fantastic channel that goes in depth on chip industry
It means they have invented ways to use these machines to print extremely small transistors and that are fast, energy efficient and have good yield (less failures in the process).