That's pretty much how every home standby generator has been set up in the past 20 years (some have the charger built into the controller, others have a separate module). The newer ones even require their own 15 amp breaker from the house on the transferred side of the panel. Usually it's no more than a 2 amp trickle charger as there isn't actually a whole lot of DC power required to keep a generator running, and a battery in good condition should be good for a half a dozen or more crank attempts in a short period of time, but then the gen either runs for a while or sits turned off for a while, giving the batteries a chance to recharge.
I've even got a few customers that their generators weren't wired properly at installation by electricians that didn't know any better using the cheapest of the cheap Harbor Freight battery maintainers inside their generators to keep enough 12V power to the battery/controller when utility power is unavailable.
As long as your battery chargers are rated for higher output than the DC loads in the generator (relays, contactors, fuel pumps, that sort of stuff) then I see no reason why your solution can't be the permanent fix. 12V battery chargers are cheap, plentiful, and readily available while the specific alternators for these generators are the complete opposite.