Billionaire Elon Musk pledged to pay to secure clean water for homes in Flint, Michigan, the city that fell into economic depression amid the decades-long decline of Detroit’s auto industry and is still recovering from a major public health emergency.