Rav Yosef Messas, following in the footsteps of the נודע ביהודה, whom he cites, has a fascinating, scathing critique of the recitation of לשם יחוד. He begins by confessing that he, too, used to recite it in his youth, as per the custom of his community, but only as a matter of habit, without understanding:
דע ידידי. כי גם אני הצעיר. רגל על לשוני כבני ארץ מולדתי הנ”ל. לומר על כל דבר מצוה לשם יחוד וכו’. בלי דעת ובלי תבונה. רק מצות אנשים מלומדה. עם נשיאת עין לשמי קורה.1
He then began to wonder what the formula really meant, but even after consultation with the degenerate Kabbalists of his day (“for just as many times grains of gold are found among the sands, so, too, I thought that perhaps I will find among them even one spark, and from it I shall kindle a coal”) he remained unenlightened, “and then I knew that they are worthless and their words are worthless”:
וזה ימים התחלתי לחקור הענין. ולחפש אחר פותר שיפתור אותה על נכון. ולא מצאתי. יען וביען. דבר זה מקורו נפתח מהמקובלים ז”ל. ובזמן הזה תמה ונשלמה חכמת הקבלה מערי המערב. ותחתיה עמדה קבלה חדשה אצל בעלי הדמיון. מלאה על כל גדותיה. רק חלופי אותיות וגמטרייאות. וסודות מעולפים בדברי הבאי אשר בדו מלבם ריקי המוח. ולמען התהלל במתת שקר. למדו לשונם איזה קטעים מדברי בעלי הסודות הראשונים הנכונים. והפכו אותם למרירות פתנים. ויחזו בקרב ההמון משאות שוא ומדוחים. וחלומות והבלים.
ואני מרוב חשקי למצא פשר דבר. עלה ברעיוני לשאול גם את פי האנשים האלה. כי כמו שפעמים רבות נמצאו גרגירי זהב בין החולות. כן חשבתי אולי אמצא אף נצוץ אחד. וממנו אבעיר גחלת. אך כאשר שאלתים כלם הקיפוני חבילות של פרושים. אשר כל איש נלבב תכסה כלימה פניו להוציאם על פיו. וכל שכן לכתבם. כי יש בדבריהם כעין כפירה חלילה מכוסה בצעיף דק. אשר לא הבינוה מחמת פתיותם. וכאשר שאלתים באיזה ספר מצאו הדברים. השיבו כך נמצא כתוב בכמה ספרים. ואף שם אחד לא הגידו. ואז ידעתי כי המה הבל ודבריהם הבל:
He then trains his guns on this formula, recited by some before prayer:
והרי אנו סומכים על דעת רבינו הא”רי ז”ל בכל כוונותיה. כדי לתקן את שרשם במקום עליון.
arguing that this is arrant nonsense (“is there foolishness greater than this?”):
ויותר השתוממתי על המנהג להוסיף בה קודם כל תפלה. והרי אנו … דאיך שייכה סמיכה בזה. כי כל אחד מעיין בתפלתו. רק במסתרו והבליו. וכוונת הא”רי החי הקדוש. שעלה אל האלקים זה מאות בשנים. תכנס תחת הרהורי עבירות המתפללים. לתקן את שרשה במקום עליון. היש פתיות גדולה מזו?
באמת לחנם אנו תמהים על האומות הטפשים האומרים. נביאם יכפר. שהרי גם אנו עם חכם ונבון. חושבים כמחשבותם חלילה.
“[T]he stupid nations who say that their prophet shall atone” is presumably a reference to the Christian doctrine of Atonement through the death of Jesus; Rav Messas’s biting, sarcastic objection that we have lost our doctrinal high ground, and his previous indictment of the “nonsense” that he heard as “a sort of heresy, Heaven forfend, covered by a thin veil” is reminiscent of the classic criticism of Kabbalah, that its doctrine of the Ten Sefiros parallels the Christian Trinity.
Rav Messas concludes that he has therefore abandoned his former custom with regard to לשם יחוד, but he nevertheless justifies his retention of the recitation of למבצע על רפתא (“as is customary in the mouth of every Jew, man and woman”), with the curious defense that “it has a melody; and the love of the melody covers up the defect of the absence of understanding”:
ובכן נסוגתי אחור ממנהגי. ובטלתי אמירתה אצל עצמי. מאחר כי נסתם ממני חזון הדברים.
ואף כי עדין רגל על לשוני לומר קודם ברכת המוציא בשבתות. הנוסח למבצע על ריפתא. כאשר רגיל בפי כל ישראל אחד האיש ואחד האשה. אף שאין לי בה מובן? התם שאני. מפני שיש בה נגון. ואהבת הנגון מכסה מום חסרון ידיעה:
Rav Messas then cites the famous responsum of the נודע ביהודה against לשם יחוד,2 as well as a number of other sources on the topic.
Update: Further discussion of לשם יחוד here.
The parallel to Christianity is limited to the notion that we can apply the kavanos of the Arizal to our own flawed prayers. Much like Christianity allows for atonement through the deeds of a long departed predecessor. With regard to the classic criticism of Kabbalah and the Trinity, in fact, he sees quite reverential to the Arizal. It seems he just feels that the Kabbalists in his day did not properly understand it.
Fair enough. But I think that Rivash also may not have been opposed to Kabbalah as properly (in his view) understood, and that his deep ambivalence is primarily toward the way in which certain Kabbalistic concepts were vulgarly understood and integrated into the ritual.