Assuming it’s a 240 wagon, correct? Given you have identified power to the rear glass terminals, the only other issue I can think of is a bad connection either between the wire and the glass at the terminal, or the terminal attachment to the glass...or possibly the silk-screened “wires” on the glass are damaged?
Depending on what year it is, the rear defog switch is either a toggle on/off switch (earlier cars) or a momentary push switch that returns home after pushing (later cars). The early cars most likely do not have a relay, and there is no timer - just turns on and off manually with the switch. On the later cars, unless I’m confusing it with the heated mirror switch, there was a timer relay that shut off after 10 minutes or something like that.
With respect to the wiper issue, I would suggest double-checking your wiring repair at the tailgate to make certain you got the correct wires on the correct terminals...also could be an issue with the intermittent wiper relay or the wiper contacts in the motor could be dirty. Confirm wiring is correct first, then swap out known good relay, then check wiper motor contacts - my suggested order.