I haven’t researched it extensively, but I know a little.
The roots of the doctrine go pretty much back to the early Church before the time of Constantine.
A fundamental principle regarding baptism of desire is that God is not bound by the sacraments. God can save whom He pleases, with or without the sacraments. When we say "baptism of desire," we use the word "baptism" analogously. "Baptism of desire" is not the same as the Christian sacrament of baptism, but rather, is the action of God that provides the graces to the recipient that he would receive through the sacrament of baptism.
In the early Church, Catechumens who were martyred before receiving baptism by water were said to have been baptized in blood. Not having received the sacrament of baptism, they had not been formally received into the Church. Yet, they were nonetheless counted as saints, and thus, as part of the Church, the Body of Christ.
During the Middle Ages, the concept of baptism of desire was developed further. The concepts of both explicit and implicit baptism of desire were explored, although most theologians posited an explicit baptism of desire, that God would reveal the fundamental truths of the faith to those who would receive it. St. Thomas Aquinas, in the 12th century, speculated thusly.
As Europeans explored Asia and the new discoveries of the New World, they encountered upright persons who didn’t receive an explicit divine revelation, and to account for their possible salvation, the concept of implicit baptism of desire drew more of a following.
I notice that you didn’t answer any of the questions in post 210.
sitetest
I should add that in the early church, even catechumens who were not martyred but died before baptism were considered to have received the grace of baptism. But of course, the baptism of desire of a catechumen is explicit.