All of them mean "at the end of" and they are sometimes interchangeable as long as they represent "at a point on and after an event or doing something"
Among those three sentences, "五月の末に" (at the end of May or on the last day of May) apparently has a different definition and therefore cannot be replaced by others.
Although those three expressions are close to one another,
"のちに" is rather a plain expression for "after something",
"末に" tends to emphasize that the following part is an eventual outcome, and
"あげくに" tends to imply ending up with something unpleasant, unfavorable, or disappointing.
(In this context, あげくに is often associated with an adverb さんざん or emphasized by another similar expression あげくの果てに).