For the troublesome power supply of the gas boiler, I purchased an inexpensive UPS with a correct sine wave Logic Power LPY-B-PSW 800VA+ 560 W.
I show the operating modes of this device in the video.
At a low cost, an excellent solution to the problem of periodic power outages.