Wow! This is a deep explanation about ego and how it works. To prevent ego from ruining your life you should be consistently conscious about your thought process.
Whenever I spot ego rearing it's head into my conversations, I pause and listen to the alertnative voice in my head. Because sometimes the best action plan is the opposite of what your ego says.