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.

Here is a new note (added 20260605). This theme has recently been modified by the finding that macrophages are constantly nibbling and processing self cells in a process that seems compatible with establishing what represents safe/healthy (whole) self cell identity. This leads to the summary article and it includes the reference to the original article.