Your first idea is exactly what I was hoping to do. In fact, it is easy to get 5v dc from a 12v battery. You can wire a “cigarette lighter” to the battery and plug in a USB charger, then plug a USB charger cable into the Pi micro-usb charging port. The thing I wasn’t sure of was the best way to disable the 24v ac -> 5 v dc part of your circuit. I assume some of your circuits also need the 5v dc. What would be really cool would be if the relay on your board could be used to turn on/off the 24v ac converter, so it only runs when it is needed. I think it’s probably drains the battery pretty fast when it’s on.
What are your thoughts?