Hi!
I was having the same problems that froze my raspberry pi (raspberry pi 3b 1 gb RAM with SSD).
Reading in the forums I tried to increase the size of the swap file. I followed the instructions given at the link
I also created an automation to restart the home assistant host at night.
This solved my problems (iI am convinced that increasing the swap file is sufficient, reboot the host empties the swap file but 2 gb is a lot…).
The idea came to me by creating a system monitor and noticing that the system freezes when the ram ran out and the swap file got saturated
