Controlling one's thoughts is often far harder and sometimes much less healthy than simply accepting that thoughts happen (brains are machines made to think). In some psychological circles mindfulness is taught not with the goal of hammering away bad thoughts that arise but rather to take an interested view that the thought is there and simply thinking something doesn't mean that thing is real.
Sure there's discipline in not acting on your thoughts of avarice and hate, but we all have those thoughts...they're fully part of the human experience. I would frankly be surprised by anyone that claims to not have hateful thoughts from time to time.
So much of our thought process occurs outside of our direct control (HERE) I would be fascinated to figure out how someone COULD control their thoughts to the point of eliminating many of the basic human thoughts everyone has.
I literally don't have thoughts of resentment, jealousy, hate, avarice anymore after a lifetime of cultivating self discipline, temperance, study and reflection on the sages of Eastern and Western wisdom.
This isn't a mystery. It's been the whole point of Stoicism, Confucianism, Buddhism, and other traditions for thousands of years.
If I were a meat puppet I wouldn't be able to control anything psychological.