If you read the layperson defniition, but the legal one applicable to any legislative or judicial body is defined as:
"... the offense of being disobedient to or disrespectful toward a court of law and its officers in the form of behavior that opposes or defies the authority, justice and dignity of the court"
now that's kind of a mix of breaking the rules and being a general dick, but the point is that to respect the intent institution you need to both respect its judgements and its identity. Musk may or may not be violating the former but is definitely failing the later.
You may not agree with this but that's how our institutions work. As for "thought crime" that doesn't apply once you open your mouth and share it with everyone else.
Speech, like thought, is well protected. Saying "the courts are useless entities and I do not respect them" is well protected.
Apart from the first amendment, I think your missing the "and" in your quote. It's required that you "oppose or defy" the "authority of the court"... I.e. violate an order.
PS. The SEC is not the courts. Musk has been rather clear that he does in fact have respect for the courts...
Edit: And to be clear I'm not saying Musk isn't guilty of contempt of court, is just has nothing to do with being contemptful of the SEC (except perhaps his motive).