I don’t think standard homeowner insurance covers floods or wildfires but otherwise you’re right.
Perhaps developers should have to bond new housing against floods prior to construction. Fully funded, third party bonds. Sensible locations will more or less be free.
The obstacle to a functional flood insurance market are all the people who can't afford market premiums, who have complained to their politicians, demanding that the rest of society subsidize their property risk.