Sure. How about using an SSR to switch the primary of the big transformer? Turn on the charger when Vbat ≤ Vcutin; turn off the charger when Vbat ≥ Vcutout.
For Flooded-cell Lead-Acid Batteries at 70degF, Vcutout should be 40 cells *2.35V/cell = 94V.
When disconnected from a charger, the resting voltage of a cell will slowly settle to near 2.10V/cell, or 84V for the string. I would use ~2.15V/cell to trigger onset of charging, which makes Vcutin = 86V.
I have a simple circuit consisting of a TL431 regulator used as a reference, and a 555 timer used as a window comparator which can drive an SSR, but would have to tailor it to your Vcutin and Vcutout. The circuit has been in use for several years on a 24V scissor lift.
Does that sound like it would work for you?