A Judge’s $65 Million Pair of Pants

Taking away a crazy judge's job and maybe disbarring him, to prevent him from selling his service as a world-class-asshole-for-hire, will be a satisfying response but won't solve the problem of frivolous lawsuits and wide-spread abuse of the legal system by self-representing lawyers.
One possible solution is to bar lawyers and judges from representing themselves in civil lawsuits. They should also be prevented somehow from 'trading' representation but I am not sure how to accomplish that effectively. Perhaps some accounting over a period to find zero-sum exchange of legal services.
Maybe a form of three-strikes law will work. If lawyers are disbarred after three frivolous lawsuit judgement, I think they'll think twice about using their free time to torment anyone who displeases them.