What is the current and historical viewpoint on universal salvation as a doctrine in the Catholic Church? What is the current and historical viewpoint on universal salvation as a doctrine in the Catholic Church?

Is there any defence or reference to this doctrine in any of the current catechisms?  And what are the historical debates which have influenced the current day opinion of the church on the subject of apokatastasis?
In the past, various saints, apparitions and other authoritative sources have stated that many people are in hell or go to hell. For example, the Marian apparitions in Fatima stated that "many souls perish in hell" and included a graphic vision of hell. In many cases, these sources have listed specific categories of people that will go to hell. 

The current catechism also states:


  The teaching of the Church affirms the existence of hell and its eternity. Immediately after death the souls of those who die in a state of mortal sin descend into hell, where they suffer the punishments of hell, "eternal fire."


However, later in the same chapter:


  God predestines no one to go to hell; for this, a willful turning away from God (a mortal sin) is necessary, and persistence in it until the end. [...] the Church implores the mercy of God, who does not want "any to perish, but all to come to repentance"


In another chapter titled "the necessity of baptism":


  The Church does not know of any means other than Baptism that assures entry into eternal beatitude. 
  [...]
  "Since Christ died for all, and since all men are in fact called to one and the same destiny, which is divine, we must hold that the Holy Spirit offers to all the possibility of being made partakers, in a way known to God, of the Paschal mystery."  


The latter part is a quote from Lumen Gentium, a document produced by the Second Vatican Council. 

In short, as per the catechism the Church decrees that hell exists, and lays out under what circumstances a person may or may not go to hell. However, it does not state that any given person or group did go to hell, and Catholics have differing opinions about this.

Universal salvation is an allowable belief in this framework, but it is not the mainstream.