Dear Alok,
I have no idea what this means: "sending escape codes to the terminal when I'm writing in a text editor".
Is Option-E an escape code?
And which terminal are you talking about – not the Terminal application, I guess?
In other words: tell us a little more about what you are doing and what you want to achieve.
But to answer your question, at least to some extent:
You can make a duplicate of the Colemak keyboard layout and edit that any way you want.
It’s important to change the duplicate’s name (inside Ukelele).
Then you can change the "dead key" combinations like Option-E into standard key assignments.
It’s all in the manual …