Some years ago, John Lavagnino and I wrote the EDMAC
software for typesetting critical editions. EDMAC was an application for use with plain TeX. Later, adaptations were made to allow EDMAC to work with LaTeX etc. (LEDMAC).
In the early 2000s, the ConTeXt package, also based on TeX, started developing methods for handling critical edition typesetting. Idris Hamid, Colorado State University, gave this talk at the TUG 2007 conference, San Diego, about doing critical editions using ConTeXt. [Update, 2026-02: now see this 2007 talk.]