I went to replace a GE 15086 Timer switch with a Leviton DH15S. The box it's going into contains 2 of the 15086 switches and one mechanical single pole switch. When I opened it up, I saw only black (hot), red (load), and green (ground) wires coming into the box (pic below). I've seen that described on this site as an "old style switch loop configuration". However, the old GE switches had their white and green leads both connected to the incoming green wire. I believe this is not correct (though it's unclear to me how unsafe it was).
After some further searching, I found a second junction box (pic below) feeding the one holding the switches (the wires go through the rear of this second box to the switch box described above). In this second box, the white (neutral) is clearly not going to the box holding the switches.
Based on this question I believe I need a neutral to power this switch. Can I tie in a new wire to the neutral wire nut in the second box and run it to the switch box to power the Leviton?
Thanks!
UPDATE I've dug around a bit more since my initial post and found more wrong (of course -- this was supposed to be a simple switch swap!). I've added a new image showing that THHN wire was run outside of conduit (and underscores Harper's observation below that the wrong box was picked by the original installer).
So in addition to running a neutral wire I'm now trying to figure out how to best address the unprotected wires here. Maybe flexible conduit from the exterior box all the way up to a new conduit-friendly switch box?
Very Bad Thing™
and a code violation.