HA occasionally crashes/is unresponsive

I have some (rather rare) crashes of HA running on a Raspbi4 with SSD, making it completely unresponsive and requires a full power cycle. It is otherwise stable and fast, though, most of the time.
I made a very strange observation: I found it crashed always and only when I tried to access it from outside my LAN via Fritzbox VPN, e.g. when on vacation. So always in rather miserable situations where I wanted to do sth. remotely and had no other access to the Pi locally. Which I basically accounted to “bad luck”. However as these occasions piled up, I looked closer and found that the crash always actually happened on those very remote accesses, so apparently as a consequence (sensors where logging properly until the remote access took place, then stopped until I finally got home to power-cycle the Pi).
Obviously that doesn’t make any sense at all, assuming that a VPN access is no different for the Pi & HA than any local access. Right? At least I just can’t think of any potential correlation here, technically or with any other conspiracy theory :slight_smile: … but maybe there is a viable explanation? So it’s not at all reliably reproducible, and most VPN accesses work well, but IF it crashes, it does so on access via VPN. The only real difference I can think of is that my asymmetric 500/25 MBit/s cable connection works on those accesses “the other way around”, so requests are much faster than the response can be delivered. However that should (hopefully…) not really matter.

And assuming no one can make sth. out of this: are there any solutions to make sure that an unresponsive Pi/HA is rebooted or power-cycled? Like a power plug that needs some keep-alive signal (provided by a HA script) to NOT power cycle, so when this doesn’t occur for 5mins or so, it would switch off and back on? It wouldn’t then leave me w/o remote control whatsoever, especially on longer vacations where I like to check things or control garden irrigation etc.

Thanks for and advise,
habitoti