You can do something like this, to auto restart apps when they exceed a certain level of memory usage.
I used this app Device Capabilities (Sorry, you’ll need an extra app if you haven’t got this one already)
Homeyscript can grow in memory usage when I fire too many scripts in a certain time. Homey becomes unreachable at those times.
While I have no critical scripts, just restarting the app at those moments works perfect for me.
(BTW, funny how Athom suggests to remove other apps than Hue, while Hue app acts odd and needs some TLC )