I'm experiencing the same problem, I was going to start troubleshooting it today which is how I came across this thread.
It's interesting, because neither the console nor the gamepad actually crash and become unusable - the (local) WiFi module (or some level of it) just (seemingly) stops responding.
When the gamepad is connected to the console, the power button functions as the console's power button; when the gamepad is not connected to the console, the power button is local to the gamepad. This is why when the problem occurs the power button still works, but only shuts off the gamepad; the gamepad seems to have disconnected from the console
The TV function on the gamepad still executes because as stated already, the gamepad does not crash (nor the console). It's just that, the image you see of the Wii U on the gamepad is purely a stream, it's like looking at a TV. The only local software on the gamepad is the TV program, and the power button which is hard-coded into the firmware.
The issue here is distinguishing which module stops responding. The one in the gamepad or the one in the console, or both.
Resetting the gamepad seems to fix the issue, which suggests that the gamepad module is the problem, and works after being rebooted. That is, unless resetting the gamepad module requests for the console module to re-establish the connection, in which case it would be the console. However, in order for the console to receive the request it would have to be responsive to begin with.
What's really strange about all this though, is that when this all happens while you're playing a game, the 'unable to communicate with gamepad' message is still streamed, constantly, to the gamepad! How is that even possible if either module has stopped responding?
However, when you're not on a game and the 'freeze' occurs, no message appears on the gamepad or on the TV. It appears to continue to stream, but without the controller being registered as connected. It's beyond strange.
I doubt it's software, as everybody would be having the same problem otherwise.
I've looked at the Wii U teardown on ifixit, and the antennae for the local WiFi route to the back of the Wii U. I'm sure you can guess where... Right behind the port for the Sensor Bar.
Try putting the Wii U on its side (with the stand) and face its back toward you. See what happens.