Is it good for parents to control children's emotions?
The situation you describe sounds like your ex is trying to paint you in bad light. Your child is at a very impresionable age and is apt to believe what he's been told. To manipulate a helpless child rarely works out for the best.There isn't a lot you can do when he is not with you, but when he is, you can have a conversation about his emotions and the things he's been told. You can challenge, in the kindest, gentlest way possible, any assumptions he has of you and prove them wrong. Just by being kind, nurturing, and carefully listening to your child, you will allow him to come to his own conclusions about you.
Emotions are not easily tamed or controlled, not even a child's. They can be influenced by certain factors and triggers, but every person needs to learn how to control their own emotions. As long as you are consistent, honest, and keep the lines of communication open,any attempt at manipulation will eventually fizzle.
Do what? You can't "control" anyone's emotions, I might argue not even yours.
You can help your kids navigate through the landscape of emotions, learn how to handle them, what is appropriate to act on and what isn't etc. But control them? You mean like, "you're forbidden to have a crush on this person"? That will only get you shut out of their private lives. They'll still have their emotions, you just won't know about them. And they'll have to navigate them all by themselves, alone.
Moral: don't try to control anyone's emotions. Be there for them, be their sounding board. Tell them your opinion if they ask, but don't insist on it. Sometimes they know what logically is the best thing to do, but might decide to act against it. Mistakes happen and they're the ones that make us human.