Maybe this idea is too ahead of its time, but:
I wonder if there could be an automatic test of judges' ability to maintain these traits. For example, every year a fake case comes before them in which a clearly innocent defendent is particularly rude and disrespectful of the system. If the judge shows an inability to separate their own ego from the ruling (e.g. penalizing the innocent indignant party) then the judge gets further review.
I think such "abuse tests" could be effective ways to vet many people in positions of power, particularly the executive branch (e.g. police).