If salvation comes through Jesus Christ, what happens to the billions of human beings who have lived on earth without a reasonable introduction to the Savior and his Gospel? There is an array of different theories on this question, which have been ably summarized in John Sanders, “Those Who Have Never Heard: A Survey of the Major Positions,” in Salvation in Christ: Comparative Christian Views, ed. Roger R. Keller and Robert L. Millet (Provo, UT: Religious Studies Center, Brigham Young University, 2005), 299–325 (link here). Those who are interested in this topic should read the entire article.
On one end of the spectrum is Universalism, defined as “All people will in fact be saved by Jesus. No one is damned forever.” On the other end is Restrictivism, described as “God does not provide salvation to those who fail to hear of Jesus and come to faith in him before they die.” Between these two extremes are three other positions:
Inclusivism: “The unevangelized may be saved if they respond in faith to God based on the revelation they have.”
Postmortem Evangelism: “The unevangelized receive an opportunity to believe in Jesus after death.”
Universal Opportunity before Death: “All people are given opportunity to be saved by God’s sending the gospel (even by angels or dreams) or at the moment of death or by middle knowledge.”
What I find particularly fascinating is that Joseph didn’t just come up with a single alternative, but in fact dabbled in three alternatives to Restrictivism. He of course was not a trained theologian, and accordingly he seemed to feel a deep and innate sense that Restrictivism was fundamentally unfair. How can we deny salvation to a human being who simply lived in a time and a place where she never had the opportunity to learn of Christ? (Mormons to this day tend to reflect this same reaction, for instance by reacting negatively to this particular feature of Calvinistic dogma.)
Mormonism is of course widely associated with the concept of postmortem evangelism, with its own unique twist of vicarious baptism for the dead. This view denies that a final decision on salvation must occur before death.
But Mormonism also at least dabbles in two of the other categories. The Mormon plan of salvation moves a fair ways in the direction of Universalism. Rather ingeniously, the three degrees of glory, by making all of them glories or heavens (only in various degrees), provides that the Judgment notwithstanding, the vast majority of humanity will inherit a “heaven.” Mormon thought also does away with the traditional Hell in two respects: Spirit Prison is only a temporary state, not an eternal one, and Outer Darkness is a state for which only very few humans would meet the foundational requirements to even be eligible for it. So yes, not strictly universalist, but a long ways towards that point of view.
Joseph also at one point dipped his toe into Universal Opportunity before Death, specifically by means of Middle Knowledge. Sanders explains Middle Knowledge as follows:
The theory of divine omniscience known as middle knowledge, or Molinism, was developed by the Jesuit Molina in the sixteenth-century in an attempt to reconcile divine sovereignty and human freedom. The basic idea is that God knows not only all the things that possibly could happen and all the events that actually will happen, but He also knows what would have happened had something in the circumstances been different. For instance, God knows all the details of your life that would be different if you did not marry the person you did or if you had attended a different university. God knows precisely what you would have done in any given situation if the situation were different in any respect. If, for instance, you had an annual income of $50,000 per year and needed to buy a car, God knows what you would buy. Moreover, God knows what car you would purchase if everything about your life were the same but your annual income was $30,000 instead. It is like Dickens’s A Christmas Carol, in which Scrooge is shown what will happen unless he changes his ways.
In his vision of the celestial kingdom (D&C 137), Joseph articulated a concept of Middle Knowledge with respect to his deceased older brother, Alvin:
6 And [Joseph] marveled how it was that [Alvin] had obtained an inheritance in that kingdom, seeing that he had departed this life before the Lord had set his hand to gather Israel the second time, and had not been baptized for the remission of sins.
7 Thus came the voice of the Lord unto me, saying: All who have died without a knowledge of this gospel, who would have received it if they had been permitted to tarry, shall be heirs of the celestial kingdom of God;
So the Prophet Joseph cast his theological net widely so as to avoid what he perceived as the manifest injustice of the restrictivist position.