If you want to be ultra-safe, there is no solution. Even Tesla cars gets on fire and I think they use name brand everything and lots of electronics. That is why cars in the old days were stored in garages not attached to the house.
It is the nature of energy storage. Gasoline, or batteries that hold a lot of charge. When these things fail, all that energy is released. Battery powered cars/bicycles are energy efficient, but there is still a need to store a lot of energy. There is no safe way to contain it. Having an electric charger at home means you are slowing filling up a lot of energy.
The other problem is that the electrolyte in the battery is also burnable (inflammable in older English, flammable in modern English usage). This is unlike lead acid batteries or carbon batteries. With a short and heat, a fire becomes almost automatic. This is unlike a shorted lead acid battery where the acid and the lead would not burn if you cut it open and hold a match to it. If you cut open a Li battery and hold a match, charge or no charge, the Li battery electrolyte will burn.
The risk is minimized with quality parts. But it is like storing a can of gasoline in the garage for the lawn mower. If it goes, the whole house goes. It is best to have a shed for this stuff. The original poster's solution is very good - just make sure you store all your large batteries in it.