Powering a 5v circuit with car and backup lipo

you need to prevent back flow, period
a diode will do it
a relay will do it
others search battery desconect/ second battery etc
id use a simple auto motive relay
it could stick over long use, and it uses power constanly when on (or off if u change types)
but is reliable could use 2 in series to provide more security

but i dont know what kind of diode you would need just knowit is possible. i use a relay to a switch on my dash to manualy turn chargeing on auto off with the car.
you can turn auto on auto off with the coil to the acc
to be short:
yes use a relay.