FWIW, on mine it was the relay slowly going out, just the up relay, 15 years ago when I bought it.
I believe there are 6 relays on that board on the driver's side side panel. I bought a used one off of eBay, and it has worked great since.
But at the time my experience was that while it was going out, it wouldn't work with the key, but would at the console, while the truck was running. Basically there is more voltage when the engine is on, and so that little extra helped out. This was on a rainy and then snowy winter trip to Yosemite, where we really needed access to the back.
I've never had issue with the rear wiper sensor, but have had issues with the power of the motor, especially when cold like on a brisk ski morning. Again, it works better from inside with the engine on. I've replaced the motor a few times with used ones, which have helped. But the best is to clean the window, and the tracks, spraying silicone on them. Getting rid of pebbles and sap, and slicking up those tracks, makes it work well.
Some people bypass the key switch or even the relay. You just need voltage, in the right polarity, to the motor to make it go up or down.
And I have this page bookmarked, which gives this info and more:
4Runner Rear Window Cheap Tricks