By the time of Joules research, coal fired steam engines were in development for over 100 years. Coal had become less expensive with time, as engine improvements added efficiency.
William Jevon noted that this improved efficiency actually resulted in more energy use, not less. Less expense allowed coal to be employed in more frivolous endeavors, such as rail transportation. It posed a paradox!
It’s interesting that Joule was evaluating the recently-invented electric motor against coal power. Remember that, at the time he did this comparison (early 1840s), the concept of a central power station was still 40 years in the future. In other words, Joule was thinking about battery powered electric motors vs coal motive power. The batteries consumed zinc, so his efficiency comparison came down to the consumption of zinc vs consumption of coal.
That was some futuristic thinking!