My wife has an anti-religious uncle who on most situations when the family sees each other brings up the scandal that rabbi X was involved with or rabbi Y...
I had mixed feelings if I should try to convince him to be religious despite rabbi X or rabbi Y, but currently I lean in the direction that these are just excuses he is raising to justify his lifestyle and even if I could adequately explain away why A]either the rabbi really wasn't guilty B] or even if he was, it is not a reflection on Judaism in general it would not really make a difference because he hates being religious for entirely different reasons and he finds it easier to justify himself in the eyes of those who give him a feeling of guilt by attacking people who he feels represent Judaism. But it is not at the foundation of why he is anti-religious.
In any case though for those who have an open mind about the issue I thought I would share some of my thoughts of what I would say if I really felt that my wife's uncle was a truth seeker who I could convince if I presented a truthful claim on behalf of Hashem. Perhaps it will help others. Or maybe you will be able to improve what I am saying.
My first basic claim is that we do what is right because Hashem demands it of us, not because this guy or that guy is a good role model or a bad role model.
If there are those that betray Hashem in the battle to spread his glory and great name in the world that just makes those who remain loyal even greater and more virtuous in the eyes of Hashem.
I would like to compare it to the story of one of King David's warriors in the Tanakh (Bible)
It says in II Shmuel/Samuel Chapter 23 (as translated in the online Chabad translation of the Bible)
11 And after him (came) Shammah the son of Agei the mountaineer. Now the Philistines were gathered together into a troop, and there was a plot of ground full of lentils; and the people (had) fled from the Philistines.
12 But he stationed himself in the midst of the plot and he defended it, and he slew the Philistines; and the Lord performed a great victory.
If no one had abandoned the battle field against the Philistines then everyone would have gotten a small amount of credit but no one person would have been singled out by the Tanakh as a warrior who brought a great victory for Hashem. But when almost everyone runs away from the battle and one guy or just a few guys stand their ground and bring victory to Hashem these people are elevated to true Hero status worthy of special praise.
So too, in the battle to sanctify Hashem's name, if there are those like the biblical Zimri Bamidbar/Numbers 25:14 who desecrate G-d's name, the proper response is not to just give up, but to look for ideas like Pinchas to reverse the situation with Kiddush Hashem. If they come up with the right solutions, like Pinchas did they will be elevated to a special status of praise by Hashem that they lacked before that time.
The Talmud also indicates this point that those who remain loyal to Hashem in tough situations, not only get credit for their act, but also the fact that others did abandon Hashem is added to the merit of the loyal Jew.
Here is a quote of the Talmud Chagiga 15a as translated by Soncino
After his apostasy, Aher asked R. Meir [a question], saying to him: What is the meaning of the verse: God
hath made even the one as28 well as the other?29 He replied: It means that for everything that God
created He created [also] its counterpart. He created mountains, and created hills; He created seas,
and created rivers. Said [Aher] to him: R. Akiba, thy master, did not explain it thus, but [as follows]:
He created righteous, and created wicked; He created the Garden of Eden,30 and created
Gehinnom.31 Everyone has two portions, one in the Garden of Eden and one in Gehinnom. The
righteous man, being meritorious,32 takes his own portions and his fellow's portion in the Garden of
Eden. The wicked man, being guilty,33 takes his own portion and his fellow's portion in Gehinnom.
R. Mesharsheya said: What is the Biblical proof for this? In the case of the righteous, it is written:
Therefore in their land34 they shall possess double.35 In the case of the wicked it is written: And
destroy them with double destruction.36
Footnotes
(28) Lit., ‘corresponding to’, or ‘over against’.
(29) Eccl. VII, 14.
(30) I.e., Paradise, for the righteous in the life hereafter.
(31) V. p. 82, n. 1; cf. J.E. vol. V, pp. 582f. Whereas R. Meir explains the verse as referring to physical counterparts of
nature R. Akiba understands it to speak of moral contrasts with their consequent reward and punishment. Cf. n. 6.
(32) Lit., ‘having been declared innocent, i.e., In the Heavenly Court,
(33) Lit., ‘having been declared guilty’.
(34) I. e., Paradise.
(35) lsa. LXI, 7.
(36) Jer. XVII, 18