Ego has been misunderstood since ages. Ego may be equal to self pride, excessive self pride, confidence, self belief, self assurance or over confidence.
You have an ego that you are the best and you strive to be that, the ego is a motivating force in your life.
You have an ego that everyone else is inferior to you and you try to crush everyone else without self growth, ego is a regressive force.
In philosophy, ego is not same as self pride. Ego there means sense of self. To dissolve that ego is a different aspect of life. No philosophy teaches you to leave your self pride and leave all titles. It only wants you to recognise that self is not real.
Use ego as a positive motivating force. Try to be a better version of yourself without demeaning anyone else. People who are insecure have egotistical issues. People who are confident about themselves have only motivating ego issues.