Actually, the best way to prevent shell rot is to just keep the animal healthy with proper conditions and water quality (Especially when molting). Water Quality > Lighting
If he's healthy, you can keep him under metal halides if you wished without catching shell rot. Providing dark places is only part of keeping the animal mentally happy and healthy.
One thing I do recall reading though is males tend to be more prone to shell rot than females, might want to second opinion that.