I have the same problem. Here's link to my thread:
Phantom 4 - gimbal shut down on mid-air
Please check the log in app (flight logs) on that day. If there is any information about the "gimball endpoint error" or "battery error"?. In my case, the problem occurred three times but on the same...