So this just happened to me while on a 650mi road trip.
Every time I hit a bump in the highway, I would suddenly loose power.
Turns out it was a fuse that had popped out and became loose. Wow!
Thermostat
Found this post after doing some research... my 97' 4Runner has been acting up recently when A. Going up into the mountains (increased elevation) and B. When the A/C has been blasting. - I live in Colorado, so its common for me to drive somewhere with an altitude change. Seeing notes...