Wiring on roof decking - re-roof

Anyone ever come across this? Fortunately re-wiring is already part of the job for this one. If the wire had to stay how would you make it safe? Would heavy-duty flashing be enough?
Romex, .... under shingles. What kind of temperature adjustment must that entail?

Even if you protected it with say 16 ga. metal, would this be outside the building structure and considered a damp/wet location?
I would use pipe in your case just to be safer and to make sure everything is in place. I also had this problem, and because we wanted to match our roof-decking with the garden design, we had to re-roof. Our designers and workers advised us to use pipe as well as it's really resistant and we did it. I don't have any problems with it now and everything looks great. I hope you also found your solution to this problem and if you did, what did you use in the end?