Yes, trailer batteries are routinely dropped in the box and restrained by nothing but their cables and the box lid, while the box is held to the tongue by a couple of little self-tapping screws.. Mine has a plastic webbing strap over the top of the box, as is common for these all-purpose battery boxes. Strangely, the same trailers with this setup usually have decently solid
propane tank retaining hardware.
Those of use more accustomed to cars are routinely surprised when we see this. If you did this in the tow vehicle, and took it to a mechanic for safety inspection, I bet it would fail... and that battery is under a steel hood. When you crash with your trailer, the battery will be a deadly flying object, but then so will lots of other stuff.
I had planned to add a proper hold-down, but the way the box mounts is a little awkward, and I'll admit that I still have not yet properly mounted it.
By the way, "sturdy" is not really a term I would use for these boxes, but they do survive for many years. The openings to allow cables to come out from under the lid are sized for starter cables for boat motors or power cables for boat trolling motors, so they do look a little more roomy than needed for the 10 gauge wires we use in our trailers.