The Tesla factory is a repurposed GM/Toyota Joint Venture factory (called NUMI, New United Motors Inc) that was closed down for a couple of years before Tesla bought it. But GM and Toyota has stripped everything out of it when they left, it was just a shell. We used to joke that you could fire a cannon at the south end and not hit anything until it went out the north wall. So Tesla started from absolute scratch.
There are two lines for the Model 3 now, in addition to the lines for the S and X still in production, albeit limited now because he has pulled people off of those lines in order to staff up the 2nd Model 3 line. They are about to hit their stated goal of 5,000 cars per month despite their MES issues. And yes, Elon is a programmer and it’s true that he has little regard for ladder logic programming, but not a lot of the machine systems use that anyway and despite his being on the line all the time, sometimes night and day, he doesn’t get into the programming of the PLCs himself, he has a huge team of programmers out there that he trusts. Like I said, the automation of individual machines is done and working, nothing is “failed” at the production machinery level, it’s all top-end stuff that has been vexing them.
Like Mark Twain, the rumors of their death are greatly exaggerated.