And now we can get to the actual text!
So the Protoevangelion opens rather abruptly:
1. In the histories of the twelve tribes of Israel it is written that Joachim was extremely rich.
That's it. There's no introduction, no explanation of who Joachim is, nothing. Just boom. Frederica claims that this is because the hearers were already familiar with the players in this story. They knew Christ and so knew who Mary was. Knowing of Mary they would be familiar with the circumstances of her own life - at least in the broad strokes - and so would know that Joachim was her father.
The text continues, outlining how generous Joachim was - he brought a double portion of gifts to the Lord, offering out of his over-abundance for all the people and for himself - a mercy offering for the forgiveness of the Lord. But then someone named Reuben chided/mocked/was an ass to Joachim and told him that he shouldn't be allowed to offer his gifts to the Lord first because Joachim had not 'begotten any seed in Israel!'
So this Reuben person made up some 'rule' that those who had children were more worthy than those who had none. It's nothing new, sadly. If you look back through the Old Testament there was plenty of shame and derision heaped on those who were childless - which may have made it all the more meaningful and sweet when God blessed those people with children and used them for greater things than those who mocked them could ever have imagined.
Regardless of the validity of Reuben's mockery (there was none), Joachim was greatly upset by it and went into the records of the twelve tribes, searching to see if it was true that he alone had raised no children in Israel. According to the text his search showed him that 'all the righteous had raised up seed in Israel.' Which I doubt as a fact. It's very hyperbolic, to tell the truth. Just a moment's reflection will tell the reader that the chances of every Jewish person having had children is nuts. Even if we could restrict it to the 'righteous' members (which one assumes would be fewer than those who merely claimed descent) statistically there would have been some who were infertile. I think the claim that he found no one else who had not raised children is there to highlight his internal shame, the pressure he was feeling from the society and possibly the natural pain of someone who desires children (a natural desire to see ones line continued) and has not been able to have them.
So Joachim, depressed, goes off into the wilderness. He doesn't tell his wife, he doesn't take food or water, nothing. He sets up a tent and determines to stay there and fast for 40 days and 40 nights.
"'I will not go down, not for food nor for drink, until the Lord my God looks upon me. Prayer will be my food and drink.'"