If a 'thermo event' is a concern with a particular battery then I'd make sure I have a fire extingquiser onboard that's capable of handling it, or a way to quick disconnect it and throw it overboard. I've seen some lithium ion fires in cars, if it were to happen in a boat, I could picture it burning through the hull in short order.
I've not dealt with any lifepo4 batteries but with Li-Ion batteries its usually a short of some type that sets off a thermal meltdown. I'd make real sure that the batteries are protected from making contact with the hull or being shorted out in any way.
An upset #27 lead acid battery can melt some wires and throw a ton of sparks but its over once the short melts away, but with lithium, its just the beginning.
I think I'd opt for a fully insulated enclosure if it were me, you likely won't have any options if it does short but you certainly limit the likelyhood of it ever happening if the battery is in a plastic box.
On both of my boats, the trolling motor, both batteries, and forward trolling motor harness all have heavy gauge disconnects. I have a similar one on my anchor winch on my 16ft which allows me to simply pull the plug and four pins and take the winch off when the boat is parked in the yard. Mainly to save the cover but it also keeps the winch from having to sit out in the weather all year.
I also pull my batteries when not in use, they reside on a rack in the garage on a smart charger. With the disconnects, battery boxes, and handles I put on them it only takes a few minutes to remove everything.