So it's the orders of one judge acting as judge, jury & executioner, which is not how we normally think of lawful process.
Now that is the Brazilian system but... there's a damn good reason other people don't do it that way. And a damn good reason that dystopian book was named "Brazil."
Also I'm not sure it's very common for courts to arrest lawyers (and basically use them as hostages) because of their clients actions in most countries.
Courts can literally compel you to comply with court orders in virtually every country, unless of course as you have pointed out, you have the means to avoid being compelled.
The “… when this is done by an arbitrary and corrupt government” sentiment has no real meaning here as you have pointed out that Musk can avoid being compelled either way.
Also I really don't understand your overall point.
This question is an equally relevant response to someone pointing out an uncontested fact about how courts work.