First, some history. As I understand it, the "dit-dit" (E E) comes from an old practice. There is a short tune in popular music that was often used to end a musical performance in a humorous way, called "shave and a haircut, two bits". The Wikipedia article has a recording of the tune. For older people, the rhythm of the notes in the tune is instantly recognized in a knock on a door; the person on one side of the door traditionally knocks the "shave and a haircut" rhythm, and the person on the other side knocks the "two bits" rhythm.
In the early 20th century, this practice carried over to Morse code. At the end of a QSO, one party would tap out the "shave and a haircut" rhythm, and the other would tap out the "two bits" rhythm, hopefully leaving a smile on both faces. In the more recent era, the "shave and a haircut" part has been dropped, possibly because it's harder to get the rhythm right with an electronic keyer, but the "two bits" part has survived. The "two bits" rhythm is what you describe as "E E". (By the way, I've never heard "shave and a haircut" as "dah-di-di-dah-di" as it says in the Wikipedia article; I've only ever heard it as "dit didi dit dit", or "E I E E" if you prefer.)
To answer your question, I don't remember ever seeing advice anywhere on how to use "E E" at the end of a QSO, because it is such an informal ritual. So I don't think it really matters, but I personally do it at the very end. From time to time I still do the "shave and a haircut" rhythm, and when an old-timer (old person) answers me with "two bits" (E E), it still puts a smile on my face.