Any way you look at it, Elon fucked up. He should have done due diligence up front.
Due diligence isn't the issue. The fact that Twitter has been defrauding every shareholder and the SEC is the issue. He can walk away easily. They should be prosecuted for fraud.