It's beyond my ability to give you a profound answer, but I'll try my best.
It mostly depends on the context, quite often they are perfectly interchangeable, sometimes their choice could imply just a subtle nuance, but there are also situations where you have to choose a particular one. More of "imperfective" usually means multiple times and vice versa, and also it affects the time frame, to which the narrator is intending to focus on in their next sentences. (Let's call it a "time marker")
Even without a context, the examples 2 and 3 sound awkward - I can't recall any case they could be used that way. (BTW ex.2 sounds OK in present tense, but not in past tense, take a note that the past and present form of "повтаря" is the same!)
I've tried to formulate examples with the exact forms you've given, in a context, where it's necessary to use just the particular form:
1) Когато тя си тръгваше, той повтаряше "Сбогом", с надеждата тя да го чуе. (Each time she left; the story's "time marker" is left at the time of her departure).
2) Той повтаря "Сбогом", докато тя не се изгуби от поглед. (Alhough he repeated multiple times, it's about just one situation, and the "time marker" is "after she left").
3) Тя не си тръгваше веднага, но щом той повтореше "сбогом", тя моментално ставаше и излизаше. Again, the implication is for multiple times, even - for a kind of routine they've used to, just this time the marker is at the moment he is repeating his "farewell".
4) "Сбогом" - повтори той, и тя си тръгна. (He repeated just once, in just one situation, and the narrative is expected to proceed from the moment after she left)