Religions and ideologies are not a problem as long as you don’t believe in them. And the stronger your faith is, the more problems you will create to yourself and to others. If you end up as an extremist or fundamentalist it is getting really dangerous.
The same thing applies for thoughts. As long as you don’t believe in them they will not cause problems. For example, if you truly believe that you are a complete idiot you will be in trouble. But if you don’t really believe that you are a complete idiot, if it is just something you say to yourself because you have misplaced your keys, then there is no big deal.
Some thoughts are extremely dangerous if you believe in them, for example:
"There is not much point with anything. Human beings are mad. There is some kind of construction flaw with us. We are always at war. We are ruining our little planet. But soon we will be dead and gone and no one will miss us."
Or:"Nothing really counts but money. I have hundreds of millions of dollars but I desperately need more. I will do anything I can to get hold of those dollars. I don’t care if small children has to work till they die for it. I want that money! Don't play no tricks with me. This is how life is set up. It is biology that runs everything."