I don't use the humidifier, so my experience is probably different. Also, my coach has an inverter that supplies 120 volt power from four house batteries, so that isn't an issue. The battery backup system from the manufacturer was something over $300.
At home I made a battery backup in case the power went out, especially at night when I probably wouldn't be aware of it. I used a tractor battery from Costco, about $65, and an automatic 3 amp battery tender supplying the battery with replacement power. I leave it connected all the time.
I'm on my third CPAP machine and all of them worked on 12 volt power, abet with a transformer in the power line to drop voltage from 120 to 12. So, I just bought a power plug from an electronics store (negative on the outside, positive on the inside) and wired it up.
I'm not sure what the replacement schedule is for CPAP machines as I could never get a straight answer from anybody. But, I found if I complained that my machine wasn't working like I thought it should, it got replaced. All of my machines have had a recording device built in and the results could be downloaded by the provider.