I want to change te battery setup in the camper van a bit.

Currently there is a single battery which is charged by either solar, engine or 230v. Then a transformer to 230v to power the outlets.

The idea is to add an extra battery. A lot of people are saying that it isn’t a good idea to put those batteries in series or parallel if the batteries are not exactly he same. Now our idea is to switch between the two batteries with the help of some relais and an Arduino or something. So then + of both batteries would be connected to a relay and after the relay we can connect them together. Is this a good/safe way of doing that? Or will we be running into issues that I’m not seeing.

Thanks in advance!