Use a primary and secondary server. In our case the secondary server is a demo server that we don't count as a source of truth, but we want it to also get the data. Data is not discarded until it is reported to the primary server.
Include proper hostname in HTTP requests.
When we are not able to connect to the WiFi access point, fail more gracefully.
I am hoping this will prevent the occasional lockups I've been seeing.