You don't need a transfer switch.
Wire it to power the router off the battery at all times.
Then, have a power supply or battery charger refilling the battery while also powering the equipment.
simulate this circuit – Schematic created using CircuitLab
When power is lost, the DC battery charger / power supply disappears. The equipment is already connected to the battery, and just picks up the load instantly with no interruption.
This is how cars are wired.
At first glance, it appears your battery kit is already set up to do that. I could be wrong.
The only issue is that the equipment might not like voltages slightly higher than 12 volts. Most equipment will be OK with it. Anything designed to run off a car's "12 volts" is certainly rated to accept 14.4 volts, because car voltages go that high.
A 12 volt lead-acid battery might be a better choice. Why? The batteries and chargers are much easier to find - they are in any auto parts store or truck service center. The chargers are readily available at 5 to 15 amps or more, so the battery can be quickly recharged. Every charger works with every battery. And the equipment is cheap because it is common.
Also, lead-acid 12V batteries "live" between 11.5 and 13 volts, and you probably won't need a buck-boost.