I can't argue with @L.Dutch's answer and I upvoted it
But let's add to the list of reasons why this can't work in a science-based context.
Exposed lava is a dangerous creature. It exists because of geological instabilities that let (if you'll excuse the drama) the demons of the deep out of their cages. Generally, the faster it moves, the hotter it starts and the hotter it remains.
When that instability occurs under an aquifer, what you get are hot springs. The cooling effect of the water lowers the volatility of those raging demons in a way that happens to be mighty pleasant useful to everything from humans to Macaques.
But that doesn't help you. You need much more heat than liquid water can deliver. You need access to the lava. Except that exposed lava, even when predictable, is a mighty dangerous demon.
Kilauea Volcano has been erupting almost continuously since 1983. Although it is noted for its approachable lava flows, the volcano undergoes many changes that can be unpredictable and life threatening. Without knowledge of the landscape and the processes that form it, visitors can find themselves in dangerous, even deadly, situations. Understanding volcanic hazards and taking the right equipment are keys to safely exploring volcanic landscapes. (Source)
Hawaii activates National Guard as Mauna Loa’s unpredictable lava flow creeps within 2 miles of critical highway (Source)
You can't control it
And with Victorian-era technology, you can't control it. Heck, with circa 2024 technology we still can't control it. Those lovely buildings in the Star Wars movies that straddle lava flows for whatever energy-gathering or manufacturing purposes? They've never existed in human history.
"Armed with shovels and pickaxes and protecting themselves against heat with wet sheep-skins", according to one academic account, the Catanians opened an artificial breach, cutting off the lava's path.
The residents of nearby Paterno were not pleased. They believed the diversion pointed the lava directly at their own community and decided to stop Catania's attempts. The breach sealed up and the lava continued flowing toward Catania, destroying a large portion of the town.
It was the modern start to what Dr Shannon Nawotniak, a professor of geology at Idaho State University, calls a "spectacularly poor success rate" of stopping lava. (Source)
Recommendation
Dump the science-based requirement. The idea is cool. I'd hate for it to not be used because it couldn't factually exist historically or today.
Or, if you insist on using a science-based solution, you're required to shift to geothermal electricity production. Time to import that graphite — and a Victorian-era technology with modern knowledge without trade is unbelievable.