You need to bring everyone along. An example of doing it right:
When Spain closed down their last coal mines in 2018, they spent €250 million on :
- early retirement for miners over the age of 48,
- restorative environmental measures in coal communities
- retrain coal miners to begin working with safer, more modern green technologies."
These mines were closed without a fight. (I mean, did you even hear about the closures?)