It works and several members have done it, as the MEP002A/003A gen sets also have flaky shunt regulators to charge their batteries.
My only caution would be to size the charger maximum current rating to the batteries - you don't want a 10 amp charger on motorcycle/riding mower batteries, as the high initial charge rate would cost you some power and some electrolyte but not get much of a rate of charge.
My plan (house outage backup system, as you're talking about) is to have a 14/2 outlet feed from the house main panel to near the generator and plug that into the charger/maintainer for the generator batteries. When power goes out (and stays off long enough - we tend to give it a couple of hours), you go start the gen set. If the internal charging circuit on the gen set is disabled, you turn the 'generator shed' breaker back on after setting the transfer switch to generator power, and that keeps the batteries charged exactly as they were on line power.
If, on the other hand, the gen set charging system works OK, you leave it off, which is easy in my case, as the SOP is to turn all the load breakers off before transferring to generator power, and then add them one by one as needed.
If you're talking about a remote, off-grid site with a generator for use when you're there, and waiting most of the time you put a big 'solargizer' charger/desulaftor panel on the roof of the generator shed and call it done.
The one gotcha is that you never want to backfeed the regulator-rectifier on the generator set with an external charger with a higher cutoff voltage. The gen set charging reg-rec is a shunt design like most motorcycles have, meaning that it tries to dump excess power to ground to pull the voltage down to the magic number. The power transistor is sized for the output of the generating coil on the set, not a big plug-in battery charger, or the charging system of a vehicle. This problem is probably why most of the bad ones are bad.