Changed to a complementary filter on the ESP32 and a message every 10 s with tilt_max, no more drops or closed sessions. Tipped the test pallet by hand in the warehouse: tilt_max 78 and the alarm fired within the same second. Dropped yaw like ciaranwalsh55 said, it was jumping around in the trailer.
Still waiting for the gateway to reconnect.

