Sure, but it's easy to fuck up too and the consequences are high. You're gambling with your home and most insurance won't cover DIY electrical work.
You have a good source for this? I see claims like this every time a discussion of this sort and they rarely come with any citations.
Insurance will pay out, provided electrical fires are covered by your policy.
They will then do their best to assign liability and pursue subrogation. If you did the work yourself, you're liable. If you're insured for that work, they'll come after your insurer. If you're not, they'll come after you. If your work is permitted and to code, you'll probably be fine, if not, good luck!
So it looks like you're correct! Unlicensed work appears to be covered, but you may paid AND sued.