St Alphonsus said that BOD can grant justification but that the person would still have temporal punishment due to sins remain. This is contrary to Trent.
St Alphonsus is not infallible. Trent is.
St Alphonsius didn't think BOD was the same as the sacrament of baptism, hence why he said that BOD didn't get rid of the temporal punishments due to sin unlike true water baptism.
There is a good reason why St Alphonsus had to come up with this doctrine. Because of the discovery of other continents , it was clear that millions of people never had access to Christ's words, nor did they have access to sacraments.
God, being Justice itself, cannot send someone to hell because they didn't have access to sacraments through no fault of their own.
There are three ways to deal with this. The invalid way is to claim that every person who is out of reach from being evangelized would all automatically go to hell, which is contrary to Justice.
There remains 2 possibilities :
1)BOD as it has been formulated in modern times. It seems to contradict previous Church teachings.
2)"BOD" as it has been formulated by St Thomas Aquinas.
Anyone who would be subject to BOD according to 1) would be saved by God's actions anyway because any person subject to condition 1) is also subject to condition 2). Therefore, there is no practical difference between the two positions in terms of consequences on who can be saved.
The only difference is that 2) is more prudent and more logically consistent with previous Church teachings. The problem is that 1) was preached by several theologians with very high authority and also by Popes.