A limited number of people in the ancient world actually saw fire flowing-- volcanic lava. It has been my conclusion that this is an origin of the "lake of fire" concept. What seems to clinch it is that sulphur and its compounds are a huge component of an eruption or any activity in which the hot, molten earth far below makes itself evident on the surface. Besides volcanic eruptions, there are geysers and fumerols of superheated water, for example. And in all these the smell of sulphur is evident, in some cases maybe overcoming. And the fire and brimstone [=sulphur] idea is not exclusive to the Bible. The observations that led to the correct conclusion that there is enormous heat and hot sulphur 'down there' was inevitably (IMO) something ancient mythologies would take up into their folklore.
While I can't say for sure if the Lake of Fire in Revelation is literal or not, it does happen that there are vast chambers of magma below the earth's surface. And I think this is what was in the minds of biblcial writers and their contemporary readers. Especially the time Revelation was written, Christianity was becoming more centered on the southern Eurasian regions, which are seismically active. Again, relatively few people had seen flowing sulphur and fire, but the stories and the effects were there.