Dukkha can perhaps be the result of activity of the ego against things which actionally doens't harm you.
When you experience a contract, the reaction of consciousness is to give a sensation of pleasantness, unpleasantness or neutral sensation. Another habitual response that follows is craving or aversion to this. [Dhātu Vibhaṅga Sutta, Titth’ayatana Sutta, Sal-āyatana Vibhanga Sutta] This is not necessarily the ego going against anything but habitual reaction. Ego is created due to thought patterns which follow, due to craving. [Tanhā Jālinī Sutta, (Vicarita) Tanha Sutta]. The main thing is not to react to sensations, being completely equanimous and knowing their arising and passing nature. [Pahāna Sutta] If you react - with aversion, craving or ignorance - then only it becomes harmful, as this will create fabrication, which result in future karmic manifestations. Also, in the present, if they are pleasant and change then disappointment follows. [Cula Vedalla Sutta]
So can you say suffering is due to an allergic ego?
You can say it is due to allergic reaction to sense experiences with craving and aversion.