People do their own electrical work all the time, and the insurance company doesn't know (and probably doesn't care).
The reason they don't care is: unless you have a > 100 year old house with knob and tube wiring, you have to go to _great_ lengths to set it on fire with electricity. Like, you have to be deliberately trying to burn your house down (we're talking connecting a hot and a neutral wire next to a gasoline soaked piece of wood and turning on the breaker).
For the most part, the biggest risk to doing your own electrical work is getting electrocuted, and 120V usually won't kill you (but it does hurt).
I did my own upgrade to Lutron smart switches, and…it was easy (just turn the fuse off first!) but…I will probably have them redone when I rewire my kitchen someday.
> That part was clearly not done by a professional.
It totally could have been. But it definitely wasn't inspected by a professional.
That said, I bought the place as-is and will probably end up selling it that way someday. I know enough about electrical work and codes (and where to look them up) that when I do something, I am confident that what I do is bringing things more up to code than they were.
And that's my logic - I may not be getting a permit every time I do some minor upgrade or change, but when I do something, it ends up in better shape than it was when I found it.
(seriously...the number of times I've found romex or old conduit wiring just wire-nutted together in the wall or between joists makes me wonder how this place hasn't burned down already)