Luckily, home owners' insurance covers stupidity as well as acts of God. So as long as there is no evidence of intentional arson, then insurance would have to pay.
In the case of electrical improvements (like hooking your hacked battery up to mains power) your insurance company just needs to do a little digging. They just need to find out if there were improvements without permits or if those improvements weren't made to code.
If they can prove you knew it was an increased fire risk, they won’t cover it.
If it's not in the policy "we don't cover homemade lithium projects", your covered. Very few things a home policy won't cover like nuclear war, terrorist acts for example. If your operating as a home business building these then that could be an issue, otherwise you can be an idiot and build whatever you want and your covered.
We don't cover !@#$ing with the utilities in ways that are not standard is probably in there somewhere..
The tie-in to the utility can easily be professional or professionally verified. That's quite separate from the battery bank itself.
That sounds really unusual I feel, the insurance company should be within their right to deny a claim if the home was destroyed due to gross negligence, like someone deciding to make a pool on their roof without asking an architect, or throwing a raging party with 700 people and the floor collapsing.