That’s a lie. The only groups I’m aware of who held to it in the late 19th century were SDAs and some Missouri Synod Lutherans. EVERYONE ELSE thought that an old earth was utterly obvious from geology and had been for a century.
As examples, Michael Tuomey in 1848 regarded attributing the fossil record to the Deluge as antiquated:
And the author’s preface to Dixon, 1850 (written by him somewhat before 1850):
So, no. Modern-style YEC (where it tries and fails to explain away geology, rather than simply tabulating history like the 17th-century chronologers or just not thinking about such things like William Smith) has only existed since Ellen White promoted the idea, and it only became a default option in many denominations from the 1960s. William Smith was about the last mainstream geologist known who held to a young-earth, and he became convinced that the earth was old by friends who were in the Anglican clergy noting the implications of the layers that he described in his publications.
Mainstream geology was widely supported by the church in the 18th and 19th centuries for giving solid evidence against the prevailing deist to atheist view of the time that earth was eternal and had gone through a series of predictable cycles in conditions. Whether there was a bunch of pre-human time that Genesis skipped over wasn’t really seen as important to theology by most people.