Hello,
I am experienced Python developer. I have developed few applications using Raspberry Pi. I can solve your problem.
1. This could be done by creating a daemon program to watch the Wifi connection. When the Wifi network available, it will connect using configured SSID and Password.
2. If you want to restart manually on SSH session, you can forward or tunnel the SSH port 22 to the internet using VPN. Another solutions is by listening a message on MQTT server, when your device received the message, it will execute a python or bash script to perform reboot.
3. The best solution to prevent hang up is to fix the program that causes hang up. Additionally, we can create hardware watchdog the monitor the Raspberry Pi. When the watchdog detect hang up, it will trigger a hard reset using relay or reset pin.
If you're interested with my solutions, please let me know.
Regards