Heat can be a factor if you are constantly on and off the brakes. I had about the same problem a few years ago while driving on an eleven mile loop in Cades Cove in the Smoky Mountains. I was creeping along in bumper to bumper traffic going up and down long hills that required me to constantly be on the brakes. Before I got to the end of the loop the red and yellow brake lights came on. After a just little longer I lost power brakes. I stopped and discovered the pump wasn't running. We sat in the shade on the side of the road about 45 minutes while the brakes cooled and the brakes started working normally again. Me constantly being on the brakes, and the heat build up in the engine compartment from creeping along bumper to bumper, was the main cause of my problem, but I think a weak accumulator contributed to my problem by causing the pump to run a lot more than it should.
You can go to Diagnostic>BCM>BCM inputs and see if the BCM thinks the parking brake is on, the fluid is low, or the brake pressure is low.