Puts on engineer's cap..
I like the theory of using the lid flanges as baffles to direct the flashover. How about this: drill 1/2" holes around the top of the box where they will be baffled by the lid flanges and THEN cover the holes with steel mesh as a flame arrestor. It is common practice to use mesh for flame arrest and is the reason fuel tank vents have mesh on them.
(I'm a member of the Society of Naval Architects and Marine Engineers)
It might be worth a test (if you have any batteries left lol). To see if you can arrest the open flame exiting the box. It would significantly increase safety if mesh works. (Due to the fact this is a metal fire I think it would need testing to make sure it works)
Cheers Rick