The matter of a judge also brings up an interesting problem. The fact that a judge has financial entanglements does not preclude them from quality legal reasoning, but it does diminish their moral credibility. Would anyone say that it is an ad hominem attack to sour on a judge because of mere financial entanglement? That the legal profession would develop ethical consensus on this matter means they also believe that credibility is an essential ingredient to legal practice, and not mere truthfulness.
And on the matter of logic, that a doctor is likely to be truthful is as logical as telling a mathematician that a famous conjecture is likely true; more accurately, these are both arguments of empiricism. This is why I see insistence on terminology like "logical fallacy" to be the habit of those who enjoy intellectual ornamentation.
That's not an ad hominem fallacy. At worst it's an argument from authority. Ad hominem is something like: the person advancing this argument has done something bad, therefore the argument they are advancing must be false (or the converse -- the person advancing this argument has done something good, therefore the argument they are advancing must be true).
An argument-from-authority fallacy is a kind of ad hominem, usually employed with respect to some third party not involved in the dispute: "This person has a credential, and they say X, therefore X must be true." The problem is that this might not be a fallacy depending on the specific credential and the value of X. If someone is a doctor, then what they have to say about medicine is actually more likely to be true than someone who is not, all else being equal. Asking your doctor for advice on how to fix your car, on the other hand, is something you probably ought to avoid, unless your doctor also happens to be into cars.