Billions of dollars in federal money has paid for repairing and replacing tens of thousands of homes wrecked by flooding.