I think it was the ancient Greeks(?) that walked while learning the epic poems in order to recite them by recalling their journey, using the associations made on the path they took. I think the method of loci[0] is similar except using purely imagined locations/details ("memory palace").
In India, there is an ancient art called 'avadhAnam'[1][2], where questioners pose various questions to the performer. This performer has to answer questions partially in a verse form, and this can go on for days, if 1000 people are involved. These people have to recite these 1000 verses after everything is over. Performer should not use pen, paper or any recording. These guys memorize many Indian texts that contain verses.
[0] https://en.wikipedia.org/wiki/Method_of_loci