Interesting question and interesting answers. It's made me think. Perhaps there are two broad areas of life: one in which my dick doesn't figure and one in which it does - and in both areas my ego operates, I suppose.
The first is the general 'external' world of daily business, contacts, friendships, leisure, work and worries. In all of this I think my ego is influenced and built up or put down by very many factors, but certainly not by having a cock a bit bigger than someone else's! I am just not conscious of it. Unless - perhaps I should add - I've had a good pump session (which I enjoy) and I'm conscious of trying to hide the results, but that has nothing to do with ego, more with embarrassment.
The other area concerns myself - perhaps the 'essential ego'. A deep ambivalence here: on the one hand I know that cock size has absolutely nothing to do with who I really am, my nature, character, abilities, my worth as a person ... it's all illusion, all in the mind. Equally I value other people regardless of their possessing a dick large or average (which latter it usually is). And yet I am fascinated by the large penis, and always have been since a teenager - other people's and my own. So there's a tremendous amount of sexual self-love going on here, which is my private world and must therefore define a very large part of what I am to myself, as distinct from what I genuinely am to the world beyond myself. I suppose that, in the end, this can be dismissed as illusion too; and yet it's not, it's desperately real.
Better stop, or I'll be right out of my depth. Hope it makes a little sense, but sorry if it doesn't.