The earliest variant of the phrase I could verify in print was 'cheaper in the dozen', from an article in the Hartford Courant (Hartford, Connecticut) of 24 May 1790 (paywalled, emphasis mine):
In New-York the price [of Webster's Spelling-books] has commonly been thirteen shillings New-York currency a dozen, which is three-pence lawful money cheaper in the dozen....
The exact phrase 'cheaper by the dozen' turns up a dozen years later, in the Hartford Courant (Hartford, Connecticut) of 12 Jul 1802 (paywalled, bold emphasis mine):
N. B. Said Chadwick will sell Morocco [leather shoes] cheaper by the dozen than can be bought at any store in this state.
Considering the context of the early uses, and the semantics of the phrase itself, the origin of the phrase is likely to have been marketing jargon.
I observe that the phrase was more recently popularized by the 1948 book Cheaper by the Dozen (Frank B Gilbreth and Ernestine Gilbreth Carey), as well as two movies based on the book, a 1950 original starring Clifton Webb, Jeanne Crain and Myrna Loy, and a 2003 remake starring Steve Martin, Bonnie Hunt and Piper Perabo. A central theme of the book and movies was the putative efficiencies of having a dozen children.
Thus, it might be proposed that the title of the book derived, however indirectly, from folk tales about or the putative practice of "plantation owners forcing prisoners of war [more commonly known as slaves] to impregnate their [presumably the POWs', not the plantation owners'][own] mother[s], resulting in a 'dozen' 'cheap' children with severe birth defects." [Bracketed material in the quote represents an attempt to clarify somewhat unusual use of the term "prisoner of war", etc.]
However, even supposing the authors of the book went so far as to confess that the title derived from a real or imagined practice such as is described in the folk tale, that confession would not in itself be sufficient evidence supporting that origin of the phrase.