I don't know their secret, but B.C. Hydro (I think it's called Terasen now) had a problem with one woodpecker in the back lane where I live that tried to set up housekeeping in a transformer. Every day I would hear him drilling away on the metal, until one day he managed to get through and he and his mate settled in and raised a family. They didn't disturb the nest until the chicks had grown, but then they sealed up the hole. I haven't heard him this year, so maybe he found an easier place to settle.