Simcha of Vitry, 11th century (this addendum prob. R. Isaac b Dorbelo, 12th c)
The story is told of Rabbi Akiva who was walking in a cemetery and came across a naked man who was dark as coal and carrying a huge load of sticks on his head. Thinking that he was alive, Rabbi Akiva asked how he had gotten into the situation of needing to do such difficult work, and offering to go to any means necessary to redeem him. The man asked Rabbi Akiva to get out of his way. "What's the story here", asked Rabbi Akiva. "I'm actually dead", the man replied, "and every day they send me to cut down trees." "What was your job when you were alive", Rabbi Akiva asked. "I was a tax collector", the man replied, "and I would favor the wealthy and kill the poor." Rabbi Akiva asked him, “Haven’t you heard anything from those appointed to punish you about how you might be relieved?” “I did hear from [those appointed over me] one impossible thing", he replied. "They told me the only way to get out of this situation is if I had a son who stood up in the minyan and declared 'Barchu et Hashem Hamevorach', and they answer after him, 'Yehei Shmei Rabah Mevorach'. If that were to happen, I would immediately be released from this punishment. I didn't have a son, but I left behind a pregnant wife. I don't know if she gave birth to a son. If she did give birth to a son, who would possibly teach this son Torah, since nobody in the world liked me?" Immediately, Rabbi Akiva decided that he would go search and see if the man did in fact have a son who he could teach Torah and teach to lead prayers. Rabbi Akiva asked the man who was being punished, "What's your name?", and the man answered, "Akiva". He asked him, "What's your wife's name?", and he answered "Shoshbina". He asked "Where are you from?", and the man responded, "Ludkia." Immediately Rabbi Akiva put himself through great difficulty to find the man's family. When he made it to the town, he asked about the man. "May that man's bones erode", the people responded. He asked about the man's wife. "May her memory be wiped out for all time", they said. He asked about the child. They responded, "He isn't even circumcised". Rabbi Akiva immediately circumcised the boy. Rabbi Akiva put a book in front of the boy, but the boy couldn't learn anything until Rabbi Akiva fasted for 40 days. A heavenly voice emerged, asked, "You're fasting on behalf of this kid?" Rabbi Akiva responded, "Master of the Universe, have I not prepared him before you?" Immediately, God opened up the boy's heart, and he was able to learn Torah, the Shema and Birkat Hamazon (the grace after meals). Rabbi Akiva stood him up in front of the community to recite Barchu, and they recited, "Baruch Hashem Hamevorach". Immediately, they released the boy's father from his punishment. Immediately, the boy's father came to Rabbi Akiva in a dream, saying to him, "May it be God's will that you rest for all time in the Garden of Eden, for you saved me from the punishment of Gehennom." Rabbi Akiva responded with a verse from Psalms, "God's name is forever, God's memory passes from generation to generation." Therefore, the custom developed for someone who doesn't have a father or mother to say Barchu or Kaddish on Motzei Shabbat [when the souls of those in Gehennom, who have been in temporary reprieve for Shabbat, are returning to Gehennom, and when it was already a French medieval custom for a minor to lead the prayers].
(Sefaria Community Translation)