Coal is going to stick around for certain applications for pretty much forever. What’d be interesting to see is charcoal refined to anthracite-levels of performance so applications needing that kind of grade can become carbon-neutral.
And it’s not even always railway enthusiasts operating the remaining steam locomotives btw in Poland they’re still in regular service. They phased out steam very late because of various economic reasons and once they did steam was already a nostalgic thing so they kept a depot and associated lines open. Contrast e.g. Germany where you don’t see steam in regular service but on various isolated narrow gauge sections.