I've seen situations where wifi was reported as connected but no traffic going through or vice-versa
see: https://github.com/esp8266/Arduino/issues/2186
there is a esp.restart() function
but: you are creating a new instance of "client" in every loop without dropping it at the end. I can't say if this might pose a problem but I would try to avoid it.
final: for your application I would consider going into deepsleep for the 5minutes instead of delay().
this will provide for a clean reboot and reconnect on every wakeup and save massive on energy, too.