I don't know of a state that would cause a dead short across any of the batteries. I do however see a state where bad things could happen. If U1 is set for parallel (12V), and U3 is set for series (24V), then setting U2 for parallel would not be a good thing.
I was mostly advising caution against possible combinations, and pointing out that relays have significant response times a few orders of magnitude slower than the typical instruction time of a uC, or digital logic that might be used to control the relays.