Kohler makes a number on industrial 400A transfer switches. Very programmable too. I got one on Ebay that had never been installed for about $1200 and mated it with my 30 KW diesel generator. A great pair, and have modbus interfaces to a remote control and display panel in my house.
Tesla doesn't play with 3rd party transfer switches, so it will never be clean, but for non-tesla batteries there are a number of solutions. EV's with decent sized batteries and V2H are now just getting cheap enough for me to pair them with something like a solaredge bidirectional EV charger so the economic model closes for load shifting. And you get a free "car" as well. It's a lot cheaper than buying the equivalent number of powerwalls, though I don't need to power everything in the home on battery since my genset does that.