Please
DO install your AGM batteries in a box sealed from your trailer interior (including 'confined' underseat spaces) with proper venting to the
exterior of your trailer.
Though AGM batteries do recombine the hydrogen inherently involved in their chemistry
most of the time, most
are a vented battery and
can release explosive hydrogen gas particularly when overcharged, a condition which can overwhelm their ability to recombine and contain the gas within the case (thus the pressure relief vent that most AGM's have). Overcharging can happen despite efforts to avoid.
Note the several references to vents, cautions advising charging in a "well-ventilated space", and avoiding proximity to ignition sources
in this Crown AGM Safety Document, for example. Though they may be 'sealed' to preclude
liquids release,
hydrogen gas is another thing entirely.
Its the "safe enough" thing to do, IMO, just for your consideration.