Or if you don't want to fiddle around with my old code, just buy one of these: https://www.amazon.ca/DEWENWILS-Digital-Electrical-Programmable-Grounded/dp/B01HVCQE68/ref=asc_df_B01HVCQE68?tag=bingshopdesk-20&linkCode=df0&hvadid=80608037717357&hvnetw=o&hvqmt=e&hvbmt=be&hvdev=c&hvlocint=&hvlocphy=&hvtargid=pla-4584207582493789&psc=1 or something like it, and program it to turn off and on quickly every couple of hours
I use one similar to this: https://www.amazon.com/dp/B01HVCQE68/ref=cm_sw_r_em_api_c_ngJDAb1M7NPYB
There’s no surge protector, but it that necessary?
If so, is there a reason you couldn’t just plug one into it?