Another company he founded, SpaceX, is the first space launch provider to ever achieve propulsive landing and re-use of an orbital-class rocket, a feat which includes some of the hardest software engineering you can do.
Another company he runs, Tesla, is famous for being one of the few car companies that makes software for their cars that people actually want to use.
If a citation is needed, it is a citation to explain how anyone could possibly believe with that track record that Elon Musk doesn't know how software is built.
Sure he might not be a whiz with React like me or the OC, but... ¯\_(ツ)_/¯
With regard to him firing too many people, see my thoughts about what his mindset might be here[1].
Not to be dismissive of landing an orbital rocket, but that's mostly a feat of aerospace engineering and control theory. On the software engineering side of things for SpaceX I think their work around CFD would be the more impressive feat from a computer science perspective.
Elon just made sweeping changes that cratered their ad revenue and took an axe to engineering teams all over the company. He did this in the lead up to the holiday season which has been the most profitable part of the year with advertisers pouring a significant portion of their yearly ad budgets into ad buys. Even if he was 100% correct that all of this was bloat, it was a monumentally stupid idea to make these changes now of all times. I would have expected him to at least have enough of an understanding of software engineering to know that deprecating systems and cutting out bloat needs to happen carefully with the talent onhand to be able to back out changes and manage the transition seamlessly. Fundamentally the risks involved are more financially impactful than the price of keeping headcount around for another year to do it safely.
Twitter hasn't even had a major incident yet and just the revenue loss from advertisers pausing ad campaigns probably already offsets all the savings they were hoping for in 4 - 6 months once the layoffs finally start bringing down staff costs.
But don't you think it's strange that (assuming so much of SpaceX's success is owed to Shotwell) nothing like what SpaceX has achieved was achieved at her previous gigs? But then she goes to work for Elon Musk and suddenly...
Regardless, the point I'm making is not "Elon Musk wrote all the software at his various companies himself" but rather "Elon Musk founding / running / exiting a variety of companies in very diverse fields but all of which are good at software is a very strong indicator that he understands software and how it is built".
Meanwhile, the "he doesn't understand software" corpus of evidence basically amounts to "I think he's doing a bad job of running Twitter in the handful of weeks he has been there. I think this even though I have very limited insight into what is actually happening at Twitter, besides what is being fed to the media by disgruntled employees who probably hated Elon Musk before the acquisition and their subsequent firing".
So yeah, in my opinion the pro-argument wins.