On top of that, if a medieval society did develop such mass agriculture capabilities, they would almost certainly be used to feed people before making fuel. If those advances happened very quickly, as in the real world over the last 200 years, there might be enough excess to use it as an energy source... but if they happened gradually, population growth would literally eat up all the benefits.Oof. You propose to fuel the heavy industries with plant-based fuels? Maybe with a lot of druids that go around casting Plant Growth it might be possible to at least grow enough plants. In our real world, we don't even have nearly enough surface to grow all the plants on. We'd need another earth just to grow all the fuels we use. But Plant Growth doesn't solve the other challenges of biobased fuels, such as the huge need for fertilizers, and all the effort needed for harvesting and converting.
Malthus gets a bad rap nowadays, but his fundamental reasoning held true for almost all of recorded history. What he didn't foresee was the explosive growth of technology in the last two centuries which let our capacity to feed people outstrip people's capacity to have babies. If the same technologies had been developed over 1000 years instead of 200, we'd still be in the Malthusian trap today.
(And as a side note, that real-world agriculture technology is overwhelmingly dependent on fossil fuels, too--not just as an energy source for the machines, but as fertilizer. Modern farming is in large part a system for converting petroleum into people.)