Is this really true, and do you have a source on this? Gas vehicles are extensively tested to ensure the integrity and safety of their gas tanks, even in extreme crashes, so I feel like the danger is actually very low.
I’m also curious what batteries you specifically used and how they are doing in terms of holding capacity after hundreds of cycles. Also, do you live in a cold location?
Gasoline in a car has a low risk of starting a fire, but a higher risk in the event of being exposed to a fire. Storing gasoline in a jerry can probably has higher risk of the first, and certainly the second.
Keep in mind both of these risks are much much lower than so many other things in your house that you do every day. Extension cords, faulty wiring, arcs, heaters, kitchen fires, etc.
I am using Enphase Encharge batteries, which are a LiFePO4 chemistry. They are in my garage, which is heated, so outdoor temperatures don'r make a difference. If they were outdoors, cold temperatures would be a problem below 0F, so if that is your situation I would only do an inside mount. I only have 20-30 cycles so far, but the cycle count is generally well regarded with this chemistry. Still, I don't expect these to last more than 15-20 years.
I am using the Enphase Encharge system, in which each battery unit also includes grid-creation capable micro-inverters. They are integrated into the same boxes, and can provide both grid offset, or grid generation. There is also a 'smart switch' that does the interconnects to the grid, and provides the autotransformer capability ( needed to have 120V split phase ).
There are some more details in my house/shop build thread on garage journal: https://www.garagejournal.com/forum/threads/jeffs-mountain-s...
Petrol inside a petrol tank inside a modern car is not the same risk as petrol sitting in a jerry can by the stove for another example.
I ended up with Enphase instead of Tesla Powerwalls primarily because the Enphase system supports direct generator integration, which allows smart generator use to offset the battery/solar system in a grid-off situation. The combo of batteries and genset makes for a very reliable scalable solution.