Custard goes back long before the 19th century. The recipe below is from the White House Cook Book, not to be confused that this cook book is authorized from the White House in Washington, DC. However later editions of this cook book were co-authored by White House steward Hugo Ziemann. The name was chosen as a marketing ploy, which seemed to work. Fannie Gillete the original author started her writing career and fame when she was sixty years old and with the first edition of the White House Cook Book in 1887.
BAKERS' CUSTARD PIE.
Beat up the yolks of three eggs to a cream. Stir thoroughly a tablespoonful of sifted flour into three tablespoonfuls of sugar; this separates the particles of flour so that there will be no lumps; then add it to the beaten yolks, put in a pinch of salt, a teaspoonful of vanilla, and a little grated nutmeg; next the well-beaten whites of the eggs; and lastly, a pint of scalded milk (not boiled) which has been cooled; mix this in by degrees, and turn all into a deep pie-pan, lined with puff-paste, and bake from twenty-five to thirty minutes.
I received this recipe from a celebrated cook in one of our best New York bakeries. I inquired of him "why it was that their custard pies had that look of solidity and smoothness that our home-made pies have not." He replied, "The secret is the addition of this bit of flour—not that it thickens the custard any to speak of, but prevents the custard from breaking or wheying, and gives that smooth appearance when cut."
Source: White House Cook Book ©1889 pg293