Switching between external power and batteries with varying voltages
An "ideal diode", such as the LTC4412, may be what you are looking for. They use FETs for switching so can handle plenty of current without too much heat.