The reason humidity is an issue is different.
Low humidity dries out mucous membranes. A physical barrier against bacteria and viruses.
So, you are absolutely correct that low humidity can contribute to infection risk, especially if the animal is not getting fresh clean water every single day.
High humidity by itself shouldn't be much of an issue but when combined with a dirty environment (food source) this enables bacteria population to explode increasing a snakes exposure.
What works in the wild does not always work in captivity, atleast in the limited living quarters and controlled environments we are talking about.
Tempurature is likely the most critical as the animals proteins(including antibodies) are designed to function in a certain range. Too high or too low and those antibodies cannot do their job.