If by "the same purpose" you mean conveying emotion, then I only partially agree.
"Hehehe" means there's
a sound of laughter. At least, that's its original purpose - a way of signifining "the person is laughing" in text. However, It doesn't stop people from texting "Hehehe" when they're not actually laghing (compare to 'lol'), so it does, kind of, convey emotion, too.
Emojis are used to make the interpretation of what youre saying easier, add that extra layer of "context", signal your intentions. Plain text doesn't include intonation, or any other means through which you could change the way your words are received. They can signify that it's just a joke, or that you're happy, or maybe that you'd rather the person you're talking to took it seriously. But again, much like with "Hehehe", it doesn't stop people from spamming emojis devoid of their function.
I remember my abusive ex used '
' to convey sarcasm or even contempt, even though the emoticon is meant to convey positive emotions, and I'm sure there are more people who do that.
I believe this topic is much deeper and more interesting than it seems on the surface.