Are you actually using Li-ion rechargeable AA and AAA cells? Those exist, but because they put out 3.7 volts, are pretty uncommon. Almost all household rechargeable AA and AAAs are nickle metal hydride, which is a much less volatile chemistry (and puts out 1.2 volts, making it mostly drop-in compatible with alkaline cells).
Phones are charged in bedrooms overnight though. But I figure this setup is better than having random electronics charging in random places everywhere in the house.
But if you wanted to be safer from a potential fire, a metal cabinet is the simplest way to do it.
A deflagration from a lithium battery would just heat it up a bit, maybe start burning other stuff inside, but it's highly unlikely to spread beyond that as it would fizzle out due to lack of fuel (also temperature).
There's a difference in risk between one machine and 6-10+