The real reason this should give you pause is that you don't want your house to burn down regardless of an insurance payout. That is how your incentives remain aligned with the insurance company.
If you want to DIY everything you need self-build insurance.
I’m definitely not covered if I were to burn my house down with a dodgy inverter installation.
Many things you still have to get a permit and have it inspected afterwards just like a professional would. But if you skip that no one will ever notice unless it's major structural work (such as a new deck).
That said, if it's electrical and you skip the required inspection and then your house burns down and your work was at fault that might nullify your insurance but I'm not sure.
In my experience insurance companies just ask you a bunch of big-picture or specific questions (eg swimming pool), reserve the right to inspect even though they never do, and then jack the rates rather than trying to grok more unknowns.
I've never read an insurance policy where anything like this is explicitly mentioned. I suppose there is a legal path of being criminally charged by fire investigators for having performed unsafe wiring (non-Listed power handling equipment as part of the fixed wiring), and then the insurance company denying you because of that criminality. Or in states where DIY wiring is not illegal, perhaps declaring that the wiring itself is "illegal" (as it goes against the NEC (despite the NEC not being openly published as we generally expect from laws!)) and then hanging their hat on illegality regardless of criminality? But does any of this happen in practice?
Surely if insurance companies were concerned about fires caused by dodgy electronics, they'd address all of the people using non-NRTL-tested GENSYM brands from Amazon et al? They've got no ability to post-facto deny based on this (said devices aren't illegal), but they could surely make it an explicit condition of policies.
I've certainly had my fair share of square wave UPSs and devices that don't work on them.