Is either of the following circuits usable as a minimalist UPS?
The second solution with lead acid would be the easiest solution, bare in mind that lead acid need to be refreshed after deep discharge, and maintenance charged.
Li-ion need extra care when charging and discharing, at least least dubble protection for OVP and over current i recommended preferable with a hard fuse aswell. Besides the charging circuit. Temperature monitioring is usually common to make sure the Li-ion doesn't get over heated and explode. Low temperature is probably not a problem in your case but it should be monitored as well otherwise.
For automation between UPS and line you could just use simple diodes and keep the charging always on for the battery and the Boost converter on as well with a lowever set voltage than the input.
You can also have circuit that charges the battery while also supplying the system, like a boost converter that supplies the rest of the circuit.