late 14c., fleem, fleume, "viscid mucus, discharge from a mucous membrane of the body," also the name of one of the four bodily humors, from Old French fleume (13c., Modern French flegme), from Late Latin phlegma, one of the four humors of the body, from Greek phlegma "morbid, clammy bodily humor caused by heat;" literally "inflammation, flame, fire, heat," from phlegein "to burn," related to phlox (genitive phlogos) "flame, blaze," from PIE *bhleg- "to shine, flash," from root *bhel- (1) "to shine, flash, burn."
The modern form of the word is attested by c. 1660. In old physiology it was the "cold, moist" humor of the body and a predominance of it was believed to cause dullness, lethargy, and apathy, hence phlegmatic.
adjective suffix, "full of or characterized by," from Old English -ig, from Proto-Germanic *-iga- (source also of Dutch, Danish, German -ig, Gothic -egs), from PIE -(i)ko-, adjectival suffix, cognate with elements in Greek -ikos, Latin -icus (see -ic). Originally added to nouns in Old English; used from 13c. with verbs, and by 15c. even with other adjectives (for example crispy).
Others are reading
<a href="https://www.etymonline.com/word/phlegmy">Etymology of phlegmy by etymonline</a>
Harper, D. (n.d.). Etymology of phlegmy. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/phlegmy