MOSFET to connect two batteries in series
While thinking that could be used relays the desired operation, I provided an outline of a possible circuit using MOSFETs. Be especially careful that the control signals must be complementary. The intrinsic diode of M1 does not impose a problem for charger 2, since M3 is conducting in this case. I leave to you the determination of resistors and proper part-numbers.