That is, Shadal is trying to prove that the Zohar is a forgery, that most if not all of kabbalah is at odds with the theology of Chazal, and that some aspects of kabbalah are idolatry. But how could we say that? We respect the gedolim of the past, as great talmidei chachamim and tzaddikim! How can we continue to do so if they were able to make such a deep error in matters of theology?
I think it is quite possible that the gemara addresses this very question. In Sanhedrin 102b, we read:
In the college of R. Ashi the lecture [one day] terminated at 'Three Kings.' 'To-morrow, said he, 'we will commence with our colleagues.' [That night] Manasseh came and appeared to him in a dream. 'Thou hast called us thy colleagues and the colleagues of thy father; now, from what part [of the bread] is [the piece for reciting] the ha-mozi to be taken?' 'I do not know,' he answered. 'Thou hast not learned this,' he jibed, 'yet thou callest us thy colleagues!' 'Teach it me,' he begged, 'and to-morrow I will teach it in thy name at the session.' He answered, 'From the part that is baked into a crust.' He then questioned him, 'Since thou art so wise, why didst thou worship idols?' He replied, 'Wert thou there, thou wouldst have caught up the skirt of thy garment and sped after me.' The next day he observed to the students: We will commence with our teachers [so referring to the Three Kings]. Ahab denotes that he was an ah [a brother] to Heaven, and an ab [a father] to idolatry. An ah to Heaven, as it is written, a brother [ah] is born for trouble,' and ab [father] to idolatry, as it is written, As a father loveth his children.I don't think the point was that there was a yetzer hara for idolatry in those days, which Hashem removed, as goes the explanation I have heard. As Rashi says, "mippenei yetzer avodat kochavim shehaya sholet."
Rather, I think there is a point here about understanding other and earlier societies on their own terms. The sociology of the Jewish community had changed from the time of King Menasheh to the time of Rav Ashi, such that idol worship was not as understandable. It was not just people who were the dregs of society, and not just the ignorant, who could fall for belief in idols. Project Rav Ashi into such a society, and it is quite possible that he would have run after King Menashe to do as he did.
This does not make King Menashe's actions acceptable. As Rabbi Abahu says beforehand, "'Did they abandon [their evil course], that I should abandon [my habit of lecturing upon them]?'" But there is perhaps a difference between lecturing about their deeds and treating those people lightly, with disrespect. We have difficulty imagining ourselves in those times.
And I think we can say the same for kabbalists. Even if kabbalah is at odds with Chazal's theology, and/or is false and should not be followed, or turns out to be avodah zarah; even if the Zohar is a forgery and all these rabbonim followed it, that does not mean that they are not wholly righteous, or smart, or able to contribute wonderful and insightful Torah thoughts in the realm of halacha, aggada, hashkafa, parshanut, and so on.
It is so easy for us to stand here in the 21st century and pass judgment, and say that if they fell for X, they could not have been so great. But frankly, I have to realize that had I had a different upbringing even in the 21st century, in a more chassidic community; or even in the same community, but had a different education, I would be as convinced of the truth of kabbalah as they are. And even more so had I lived in their times, where kabbalah was assumed by everyone to be authentic, but it was Sabbatean kabbalah under attack, or Chassidism, etc., it is quite possible that I would have studied kabbalah, and produced kabbalistic divrei Torah, and so on.
But even though I disagree with them in one aspect does not mean I cannot respect the depth of their Torah knowledge, and their righteousness, in other areas. For example, I can respect the Rambam as a halachist and a theologian, even as I can reject much of Aristotelean philosophy and science as nonsense.