I believe I have the same thermostat. I have it hooked up to my CHE. I have the probe suction cupped to the wall inside the tank, an inch or two above the substrate. Yes, wires inside the tank are something to watch for, and checking to make sure the probe hasn't been deattached from the wall. I have the probe and wires from both my thermostat and thermometer inside the tank, and I find that as long as you try to put them in a place the snake will likely ignore, and check on them every day, it seems to be fine. Try to put them somewhere the snake isn't likely to pee.
I'm assuming that heat lamps work generally the same as CHEs here. Perhaps someone will be able to provide a different idea, but I think putting the probe in the enclosure is inevitable with top heat.