I've had a stupid charger/powersupply adjusted to 13 V connected to a small 12V lead battery for 6 years now, driving router, wifi access point, network switch, modem and a raspberry pi (using a 12V to 5V DC converter) for 6 years. Foolproof and no circuitry needed.