fortress until the Third Age; Beleriand, the land of The Silmarillion, sank at
the end of the First Age. However Tolkien later decided the Elvenking had
come from Beleriand, and modeled his fortress on the halls of Thingol in
Doriath. So it is possible Thingol had dungeons, although I remember no
reference to them in The Silmarillion. Luthien, when Thingol imprisoned
her, was in a specially-built tree house. But then she was Thingol's
daughter, after
all.
“I dislike Allegory - the conscious and intentional allegory - yet any attempt to explain the purport of myth or fairytale must use allegorical language. (And, of course, the more 'life' a story has the more readily will it be susceptible of allegorical interpretations: while the better a deliberate allegory is made the more nearly will it be acceptable just as a story.)” (From Tolkien Letter # 131.)