It is not entirely clear what Epicurus meant by 'pleasure'. It does seem fairly clear, however, that 'maximisation' of pleasure does not capture his view. So if this is a utiitarian element, it needs to be clipped out of one's account of Epicurus. The headline answer is that Epicureanism is neither egoism nor utilitarianism and no closer to one than to the other. Read on.
Epicurus' 'Letter to Menoeceus' sets out his position as follows (Men. 131):
[W]hen . . . we say that pleasure is the goal [telos] we do not mean the pleasures of the profligate or the pleasures of consumption ... but rather
the lack of pain in the body and disturbance in the soul. (The Epicurus Reader, 31 : see 'References'.)
☛ Static pleasures
We can add to this a surviving bit of 'On Acts of Choice and Avoidance' (Peri aireseos kai phuges) where he says that :
Peace of mind (ataraxia) and freedom from pain (aponia) are pleasures which imply a state of rest'. (Dionenes Laertius, 'Epicurus', §136 : see Reference.)
'Ataraxia is untroubledness/ tranquillity. Ataraxia and aponia, pleasures of rest, as we may call them, are katastematic pleasures. (Dionenes Laertius, ibid.) From now on katastematic = catastematic.)
So if pleasure is the telos, the telos is 'catastematic pleasure': this is the pleasure one has when one is in a particular static or continuing condition as distinct from the pleasure that derives from activity. Painlessness is the catastematic pleasure of the body and tranquillity is the catastematic pleasure of the soul (or mind).
I don't see how either painlessness or tranquillity can be maximised : there are no degrees of painlessness, for example, and so the condition cannot be maximised. One is in it - or not.
☛ Kinetic pleasures
These are pleasures of activity, pleasures one get from or in doing something. Thus Epicurus says in 'On the Goal (Telos)' :
For I at least do not even know what I should conceive the good life to be, if I eliminate the pleasures of taste, and eliminate the pleasures of sexm and eliminate the pleasures of listening, and eliminate the pleasant motions caused in our vision by a visible form. (The Epicurus Reader, 78.)
All that this commits Epicurus to is an admission that he cannot conceive of a good life from which these pleasures were removed or absent. It does not follow that, being necessary to the good life, they are also to be maximised.
▻ PLEASURE AND VIRTUE
DeWitt summarises this relationship as follows :
"It is impossible to live pleasurably without living according to reason, honor, and justice, nor to live according to reason, honor, and justice without living pleasurably." (N.W. DeWitt, Epicurus and his Philosophy, Minneapolis : University of Minnesota Press, 1954, 246.)
▻ SELF AND OTHERS
There is a tension in Epicurus' ethics. On the one hand, other people are potential destroyers of the tranquillity (ataraxia) one seeks ; this is particularly the case in political contexts, and Epicurus does not encourage political participation. In political life we are readily exposed to the hostility of enemies - hardly a recipe for preserving ataraxia. Political life also puts friendship at risk, and friendship is especially to be valued. Friendship provides the security that protects ataraxia. So other people are both potential enemies (thus harmful) and potential friends - and friendship more than anything else contributes to the blessedness (makariotes) of life.
Since one of the conditions of friendship is that one takes one's friend's interests into account in their own right, and not simply for one's own benefit, this rules out a strictly egoistic view of friendship and pleasure. (But what happens when one's friends' interests conflict, ataraxia-disrubingly, with one's own ?) (J.M. Rist, Epicurus : An Introduction, Cambridge : Cambridge University Press, 1972, 128-9.) Egoism is also incompatible with Epicurus' linkage between pleasure and virtue : virtue requires one to take others' interests into account for their own sake.
Epicurus, The Epicurus Reader: Selected Writings and Testimonia (HPC Classics), ed & tr. Brad Inwood & L.P. Gerson.
ISBN 10: 0872202410 / ISBN 13: 9780872202412
Published by Hackett Publishing Co, Inc, 1994.
Diogenes Laertius, Lives of the Philosophers II, X, 'Epicurus', tr. R.D. Hicks, Cambridge, Mass. : Harvard University Press, rev. 1931.
Boris Nikolsky, 'Epicurus on Pleasure', Phronesis, Vol. 46, No. 4 (Nov., 2001), pp. 440-465.
Jeffrey S. Purinton, 'Epicurus on the Telos', Phronesis, Vol. 38, No. 3 (1993), pp. 281-320.
J.M. Rist, Epicurus : An Introduction, Cambridge : Cambridge University Press, 1972.
N.W. DeWitt, Epicurus and his Philosophy, Minneapolis : University of Minnesota Press, 1954.