May I know what's the APP version you have installed?
You mean the APP will freeze and WiFi auto disconnects in 5 seconds, right?
Please check your WiFi list about the signal strength for networks around since it's easy to be affected.
Throw away all your existing Wifi networks in your device (iPad/Android phone) and reconnect to the Phantom. It should be ok. I had the same problem as it tried to connect to another preferred Wifi network and abandoned the Phantom Wifi network. After successful connect, try adding one or more other networks, first without auto-connect. The problem was solved at my end this way.
The app does not connect directly to the AC. The RC has to time out a missing wifi signal before it reports a loss of signal to the app. Could just be a loose connection in the RC.
ed_drone is correct, to insure your mobile device does not switch to any wrong wifi source, (eg, "Saved") connections, select the Phantom's wifi as the "prefered" connection.
How long you have owned it? It's fine before?
Please try to re-link your aircraft and remote, and change another mobile device with a different brand as Samsung.
Have you tried to delete the APP and re-install it? your Samsung is up to date as well, right?
I discovered the gimbal, mainboard and camera ar ...
That's normal, there will be a error message popping out on the APP screen if it's really overheating, please do not worry about it.
To confirm, you can connect the WiFi and it does not freeze again, right?