Surely, thoughts are not immediately harmful to others. But, I think my shrink friends will aver the thoughts may be harmful to the individual. Just my opinion, of course.
I remember when I finally was able to give up smoking. Part of the routine was to find other things to do when the urge to smoke came about.
The bird thing is just an old saying. When you're an old geezer like me, you'll want to have a few old sayings to spout every so often. It justifies your geezerhood.