Replacing capacitor with a battery as a filter/buffer in a 6V circuit - is it a viable idea?
Here's a quick schematic I put together of your idea. It basically uses a supercap(as Jon suggested, sizing the supercap would totally depend on the expected runtime of the device) as energy storage. The circuit might need more refinement, but should give you a rough idea of the components, and i think it is totally viable. Let me know if you need any more info on the schematic







simulate this circuit &ndash; Schematic created using CircuitLab

It basically uses as Verter module from adafruit, couple of 250F 2.5V supercaps(digikey has plenty of these) in series and a bq24640(I could not find an off the shelf module for this, but there are eval kits available for this chip on digikey)

hope this helps, good luck!