I doubt it. If anything I suspect many pet snakes have a weakened immune system when their environment is overly & artificially regulated "24/7".
That doesn't happen in nature. This is my opinion...I cannot back it up with "studies" so don't ask. (I also recommend occasional exposure to real sun!)