The part about coal coming from dead trees during a window of time before bacteria evolved lignin digestion is no longer the scientific consensus. Such bacteria existed earlier; not all coal is high lignin; and coal still formed later. Too bad; it was a lovely story!
It's not bacteria. The only organisms that can digest lignin are fungi, and they do it by blasting lignin with peroxides.
As such, this works only in aerobic environments (not swamps).