This idea that DIY wiring can invalidate your insurance policy is widely repeated, but I don't think it's true.
Homeowner's insurance routinely covers preventable disasters. Did you leave a candle on or a heater plugged in and start a fire? Did you not cut down a tree that was looking unhealthy and it fell on your home? These are all situations where your insurance would pay a claim. The cases where they would not pay a claim are more along the lines of "deliberate arson".
You may well need to certify that work is permitted in order to get an insurance policy.
Relevant reddit thread: https://www.reddit.com/r/HomeImprovement/comments/7vwe23/doe...