I don't know enough to have any clue. But I suspect they have automated/streamlined a lot of their production.
My son was just telling me literally today about Tesla's auto structures. He's interning at Hyundai R&D and he went to a presentation about chassis tech. Apparently the main Tesla chassis is super efficient to produce -- something like 1/10 of the cost of an average vehicle -- because it's all cast metal and it is much quicker to fab. It was a short discussion and I can't say anything more about it, but the point is that there are a lot of cost savings out there.
One reason that leadership in tech industries tends to oscillate is the problem of depreciating equipment. When you build a manufacturing facility for $1B this year, you're not building a new one two years from now. So the company gets tied down to a specific method of fabrication. That might not always or even usually be a problem, but in a fast changing field, a new process could be developed in the very near future that dramatically reduces costs -- but the whole facility has to designed around that process.
BYD and pretty much everything in the Chinese EV industrial system is new. American automakers are producing cars out of old plants. The plants are modernized and updated, but there is only so much efficiency that can be squeezed. Ford and GM can't make cast metal chassis without building entirely new plants. At least that's my cursory understanding with some of my own inferences, so take it for what it's worth.