I just remembered something that may be important... Or it may just be coincidence... Both times the car hesitated and lost power it had been raining hard. But the problem disappeared despite the rain.
So today I cleaned the MAF and replaced the fuel and air filters, which were both replaced at 185k miles, or 24k miles ago. PCV valve and spark plugs were also replaced 24k miles ago. Fuel filter did not appear to be dirty or contain any water based on the clean gas that came out.
While I was cleaning the MAF I also cleaned the throttle plate, which was really not all that dirty. (I did not clean the IAC because I had no gasket, but symptoms make me think it's not the IAC. Power loss was when engine was no where near idling condition.)
Due to the problem's possible association with rain I took apart and cleaned all ground wire terminations in the engine compartment, including the two hard to reach ground connections between the engine cam box and the frame rails.
So we'll drive it a while and see if the problem comes back. I'm still suspicious of the fuel pump.