word-forming element meaning "in; into," from French and Old French en-, from Latin in- "in, into" (from PIE root *en "in"). Typically assimilated before -p-, -b-, -m-, -l-, and -r-. Latin in- became en- in French, Spanish, Portuguese, but remained in- in Italian.
Also used with native and imported elements to form verbs from nouns and adjectives, with a sense "put in or on" (encircle), also "cause to be, make into" (endear), and used as an intensive (enclose). Spelling variants in French that were brought over into Middle English account for parallels such as ensure/insure, and most en- words in English had at one time or another a variant in in-, and vice versa.
early 14c., "a drawing out, delay;" late 14c., "trailing part of a skirt, gown, or cloak;" also "retinue, procession," from Old French train "tracks, path, trail (of a robe or gown); act of dragging," from trainer "to pull, drag, draw," from Vulgar Latin *traginare, extended from *tragere "to pull," back-formation from tractus, past participle of Latin trahere "to pull, draw" (see tract (n.1)).,
General sense of "series, progression, succession, continuous course" is from late 15c.; train of thought is attested from 1650s. The railroad sense "locomotive and the cars coupled to it" is recorded from 1820 (publication year, dated 1816), from the notion of a "trailing succession" of wagons or carriages pulled by a mechanical engine.
<a href="https://www.etymonline.com/word/entrain">Etymology of entrain by etymonline</a>
Harper, D. (n.d.). Etymology of entrain. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/entrain