I've been going through the new volume of Afikei Mayim, essays by a student of R. Moshe Shapiro. In the beginning of this volume on Shavuos, there is a short pamphlet about faith in the Sages. Chapter 6 of that pamphlet discusses the holiness of the Rishonim (medieval sages) and those who were part of the transmission of the Torah. The first section of this chapter is titled "Ein Le-Fakfek Be-Divreihem Z"l" -- one may not question their words. What follows are select quotes from authors throughout the ages -- including R. Moshe Alashkar (AKA Maharam Alshaker) and R. Moshe Sofer (the Chasam Sofer) -- who state that it is forbidden to contradict a Rishon. A great quote is from the Maharam Alashkar: "One who disagrees with anything from their words is like one who disagrees with God and His Torah"
If I understand correctly the point of the editor/author of this pamphlet, the Chasam Sofer was a heretic. Why? Well, in his commentary to Nidah 17b, R. Moshe Sofer states that the commentaries of Rashi and Tosafos (and Maharam Lublin) contradict anatomy:
אחרי החקירה מפי ספרים וסופרים חכמי וספרי הניתוח אי אפשר לנו להכחיש המציאות שאינו כפירוש רש"י ותוס' וציור מהר"ם מלובלין ואין לנו אלא מה שכתב הרמבם... ולכן לא הטרחתי כלל בבאור רש"י ותוס' בשמעתין כי אי אפשר להולמן לפי המציאות האמיתי ואתה דע לךIt's not just that the Chasam Sofer had a theological view which we are no longer allowed to hold (cf. p. 44 in the footnote), because here he is actually rejecting Rashi and Tosafos based on science! So this Shavuos, if you have a question on a Gemara, don't go looking in your Chiddushei Chasam Sofer. (If I recall correctly, the Nishmas Avraham on Yoreh De'ah 191 quotes R. Shlomo Zalman Auerbach as agreeing with the Chasam Sofer, so preferably don't look up a halakhah in Shemiras Shabbos Ke-Hilkhasah because you might see R. Shlomo Zalman quoted in a footnote.)
I'm also surprised that the editor/author did not add a footnote explaining how the Maharam Alashkar rejected Rabbenu Tam as contradicting reality in his Responsa (no. 96). Clearly, he did not consider himself to be disagreeing with God and His Torah.