With our societal move away from religion, we lost (what I think is) the useful metaphor of demons to explain some behaviours and frankly, it is my theory that demons and ideas are akin to viruses : they come, take ahold of who they can, thrive where they can, to take everything they can until they can't.
From the short post you shared, your daughter seems, for a lack of better words, possessed by this terrible terrible idea. Sadly, I have no idea (!) why some ideas stick to some whereas other won't attract ideas even close. But yeah, you are right, one should never consider their own thoughts to be absolutely true.
Sorry that you got this lesson is such a hurtful format. Hope your daughter gets better.