In Islam there is the idea of the nafs;
And We have already created man and know what his nafs whispers to him, and We are closer to him than [his] jugular vein
Quran : Qaf 50 16
Is this similar to the concept of the ego? Is it about tempering ambition?