TT #46 · Parashas Va’eschanan · Passuk 6:8
And you shall bind them as a sign upon your hand, and they shall be for frontlets between your eyes.
Torah Temimah points to the baraisa that only one who is obligated in the mitzvah of binding may write tefillin / mezuzah / a Sefer Torah (Gittin 45b / Menachos parallel).
English: Rav Chinena son of Rava of Pashronia taught: A Sefer Torah, tefillin or mezuzos written by a Sadducee, a Cuthean, a non-Jew, a slave, a woman, a minor or an apostate are invalid, as it is said “and you shall bind them… and you shall write them” — whoever is included in the binding is included in the writing, and whoever is not included in the binding is not included in the writing.
Semichut / diyuk of “ukeshartam… u-chesavtam” — only one obligated to bind may write.
Tefillin, mezuzah and a Sefer Torah may be written only by a person who is himself obligated in the mitzvah of binding tefillin.