The cost of coal is mostly the cost of the raw material inputs. And coal has a significant off the books negative externalilty because of CO2 emissions and environmental destruction.
vs
Solar which has a high labor cost component. Noting that providing jobs for large numbers of lower skilled workers is an off the books positive externality.
At some point people will have installed capacity that only needs minor maintenance and these jobs can shift to other sectors.
Don't these data get reported to government, and worker on academic and corporate economists? Who endeavour to account for the effects of employment in an econo-socio-politio-historic evaluation of the world.
It's counted as a 'cost' but over the big picture it's not.
It's like this economics teaches us that labor is a cost to be minimized. All good and well except if workers have no money they can't buy anything.
[1] https://www.youtube.com/embed/l2bU_tOREos?vndel=watch&vndapp...