"a woman who assists women in childbirth," c. 1300, literally "woman who is 'with' " (the mother at birth), from Middle English mid "with" (see mid (prep.)) + wif "woman" (see wife). Cognate with German Beifrau.
word-forming element making nouns meaning "place for, art of, condition of, quantity of," from Middle English -erie, from Latin -arius (see -ary). Also sometimes in modern colloquial use "the collectivity of" or "an example of."
Others are reading
<a href="https://www.etymonline.com/word/midwifery">Etymology of midwifery by etymonline</a>
Harper, D. (n.d.). Etymology of midwifery. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/midwifery