Can anyone explain how cache data protection works in the event of a total power failure? I'm assuming that battery power somehow writes cache contents to disk?
No, battery protects NVRAM (or rather it is NVMEM today) to keep its content after power loss; if system is left completely without power for too long, it may happen that write cache is lost.