Here's the 2018 compensation plan: https://ml.globenewswire.com/Resource/Download/edfcfa2e-bcb6...
It basically says that Elon doesn't get anything unless the stockholders at least 2x their investment, and Elon gets approximately 10% of the company if stockholders 10x their investment. Each tranch had revenue and EBITDA requirements as well, so it was not possible for Elon to just pump the stock. He achieved all the milestones: the company grew significantly, the stockholders 10x-ed their investment.
The judge thought that the stockholders were not properly informed about the board in 2018. Now in 2024, not only have they been informed but they reelected Kimbal Musk as well.
BTW this deal was the most stockholder-friendly deal ever, because Elon only got his compensation if the stockholders got rich. I think it was a good thing, the first of its kind. If they made a new package like this (+10% for another 10x from here), I would vote for it.
Also worth mentioning that his compensation package was worth 2.3B in 2018 when the shares were separated.
Also worth mentioning that everybody found the milestones ridiculous and unachievable in 2018.