
Sauron's "folly".
Gandalf:
‘And this is the dreadful chance, Frodo. He believed that the One had perished; that the Elves had destroyed it, as should have been done. But he knows now that it has not perished, that it has been found. So he is seeking it, seeking it, and all his thought is bent on it. It is his great hope and our great fear.’
'Mount Doom' chapter:
"And far away, as Frodo put on the Ring and claimed it for his own, even in Sammath Naur the very heart of his realm, the Power in Barad-dûr was shaken, and the Tower trembled from its foundations to its proud and bitter crown. The Dark Lord was suddenly aware of him, and his Eye piercing all shadows looked across the plain to the door that he had made; and the magnitude of his own folly was revealed to him in a blinding flash, and all the devices of his enemies were at last laid bare. Then his wrath blazed in consuming flame, but his fear rose like a vast black smoke to choke him. For he knew his deadly peril and the thread upon which his doom now hung."
Consider the first passage. So we're supposed to think Sauron never knew how his own existence was tied to that of the Ring? For us the destruction of the ring and that of Sauron go hand in hand. But in this passage it's as if Sauron had never considered how much of his own power had passed into the ring. It was conceivable that the ring had been destroyed but not himself.
And in the 2nd passage we have maybe a hint of Sauron realizing it. *There* (on Sammath Naur), *here* (Barad Dur) was shaken. If the there (the ring) was destroyed, 'here' would be destroyed too.
And note 'proud and bitter crown'. Towers are not proud and bitter. People are. And Kings wear a crown. So here Tolkien is describing Sauron. We do see a crown in Tolkien's drawing of Sauron:
https://www.sphaerentor.com/tolkien/galerie/tolkien/tolkien43.jpg
And where did get Gandalf the idea of Sauron being destroyed if his ring was destroyed? From Saruman? From the elves? They came up with the name Mount Doom very quickly. "For he knew his deadly peril and the thread upon which his doom now hung."