Check to see if the AC tubes are freezing in the engine bay on the heater box
That would mean you are low on "Freon", and its getting TOO COLD so flow inside the tubes stops until it "unthaws"
Could also be one of your pressure switches is failing, opening and then not closing right away when pressure is correct again
And then there is the PCM, the computer, it is what controls the AC
It has a "relay" inside it that you activate using the dash AC switch, demand signal
PCM then connects pressure switches(the ground) to the AC relay which then turns on and sends 12v to AC Clutch
When you press gas pedal to the floor(WOT) PCM turns off that internal "relay" to shut off AC for more power from the engine, which is the point of WOT
Now, since WOT seems to reset it then it may be a computer issue, but very very hard to diagnose that and the least likely issue