Is the major function of phagocytes the disposal of microbes and other foreign agents?

No !!! By far and away the largest task undertaken by phagocytes is the identification and disposal of dying-self-(zygote-derived)-cells; the largest proportion of these die through processes of controlled cell shutdown – like apoptosis.

Indeed, I would argue that aggressive adaptive immune responses to microbes are promoted by finding microbe peptides and antigens that have become associated with disruptive ("catastrophic") self-cell-death.