Author Bill Tammeus asks a question of "Why does it require a seminary degree and ordination to be able to baptize people and to oversee the Eucharist?"  It doesn't; In the Catholic Church anyway. According to Catholic.com, baptism does not require an ordained priest nor a degree to baptize.  The quote:  The minister of this sacrament is the priest, to whom it belongs to baptize, by reason of his office. In case of necessity, however, not only a priest or deacon, but even a layman or woman, nay, even a pagan or heretic can baptize, provided he observes the form used by the Church, and intends to perform what the Church performs.   The link:  https://www.catholic.com/encyclopedia/baptism   

As a metaphor, whereas, generally one would prefer a licensed Doctor to save a life, in the case of emergency, CPR and Heimlich maneuvers ought to be performed to save a life.  Therefore a death bed baptism with no priest, I would argue as being legitimate.