What about a mechanical switch , but it goes into a small simple electronics module...then the module measures the voltage of each battery...and decides whether a relay actually gets switched on or not.......ie connecting the "sunny" panel to the "shaded" battery aswell as the "sunny" battery. If the batteries are the same voltage, then the relay will switch on...if not, then it wont.
Alternatively, connect each battery together with chargers, one going one way, and the other going the other way.....obviously only one charger would work at a time (but you could have them working together of course, just wouldnt be too much point). They could even use much of the same wiring to the batteries.