Texas is planning for a post-coal future with renewable energy poised to become its second-largest source of electricity, even though the state spent years fighting federal regulations it said would stifle coal power.

A pro-coal Trump administration is actively rolling back U.S. environmental regulations, but coal-fired power plants in Texas are still closing, and wind power is projected to surpass coal as the state’s second-largest source of power in less than a decade, trailing only natural gas, analysts said.

The regulatory fixes are either too late or too little to counteract the...