I did the opposite of what you describe here. I took at least one religion class every semester (13 total) during my undergrad at BYU.
Then during grad school I had a series of potentially faith-shattering experiences of various kinds, some of which were life circumstances (I was single and it was honestly pretty tough), but the majority of these experiences came via the material I was studying and the overt (albeit respectful) atheism and worldliness of some of my peers and professors.
That said, 5 years of BYU religion classes forced me to get into the habit of doing rigorous spiritual "homework" rather than a habit of casual scripture perusal. Because of this habit, and the skills I developed of studying the Gospel with scholarly intensity, I was able to confront some of those faith-challenging experiences head-on and come away with my testimony intact, and maybe even stronger for the tests.
I don't claim that this is or would be true for everyone, but I personally was and am grateful for the rigor of my religion classes at BYU.