A curious question. Those same people also bred brassica oleraceae into so many different crops so they had to have SOME idea of how plants worked. Maybe they did not attribute it to molecules but growing conditions or locations, or something.
Either way somebody somewhere wondered about this before 1820.
Humans have definitely had some understanding of selective breeding for a long time, but only partial understanding of recessive genes and the risks of inbreeding (almost all societies have incest taboos, but that didn't stop the Habsburg lip).
Either way somebody somewhere wondered about this before 1820.