From: Rabbi Moshe Sofer
To: Rabbi Yaakov Ber
A scribe who sold tefillin with missing or incomplete parshiyos was later disqualified; the question arose whether a Sefer Torah he had previously written must also be invalidated retroactively. The Chasam Sofer rules the Sefer Torah remains valid, arguing that as a sinner motivated by profit, the scribe has no incentive to compromise the Sefer Torah, and a single known incident is insufficient to establish mumar status.
Source: Shu"t Chasam Sofer OC §7