The development of a systematic approach to food safety didn’t happen until the 20th century. And it's tied directly to NASA trying to make sure astronauts didn’t get food poisoning in space.
Research:
Cronk, Theodore C. “The Historic Evolution of HACCP: Better Questions, Safer Foods.” Food and Drug Law Journal , 1994, Vol. 49, No. 3 (1994). Via JSTOR. https://www.jstor.org/stable/26659230
DiCicco, Mike. “How the Moon Landing Led to Safer Food for Everyone.” NASA Spinoff. 11/23/2020. https://spinoff.nasa.gov/moon-landing-food-safety
Food and Agriculture Organization of the United Nations and World Health Organization. “Understanding Codex.” Rome. 2018. https://www.fao.org/3/CA1176EN/ca1176en.pdf
Fortin, Neal D. “The Hang-Up With HACCP: The Resistance to Translating Science Into Food Safety Law.” Food and Drug Law Journal , 2003, Vol. 58, No. 4 (2003). https://www.jstor.org/stable/26660309
Hulebak,, Karen L. and Wayne Schlosser. “HACCP History and Conceptual Overview.” U.S. Department of Agriculture
Institute of Medicine (US) and National Research Council (US) Committee on the Review of the Use of Scientific Criteria and Performance Standards for Safe Food. Scientific Criteria to Ensure Safe Food. Washington (DC): National Academies Press (US); 2003. 1, Historical Perspective on the Use of Food Safety Criteria and Performance Standards. Available from: https://www.ncbi.nlm.nih.gov/books/NBK221553/
Johnson, Renee. “The Federal Food Safety System: A Primer.” Congressional Research Service. December 16, 2016. https://sgp.fas.org/crs/misc/RS22600.pdf
Myhrvold, Nathan et al. “The Complex Origins of Food Safety Rules--Yes, You Are Overcooking Your Food.” Scientific American. 3/13/2011. https://www.scientificamerican.com/article/complex-origins-food-safety-rules/
“A Dividend in Food Safety.” January 1, 1991. https://ntrs.nasa.gov/citations/20020086314
Ross-Nazzal, Jennifer. “’From Farm to Fork’: How Space Food Standards Impacted the Food Industry and Changed Food Safety Standards.” From Societal Impact of Spaceflight. Government Printing Office, 2007. https://history.nasa.gov/sp4801-chapter12.pdf
Safe Food Alliance. “The History of HACCP.” https://safefoodalliance.com/haccp/the-history-of-haccp/
Weinroth MD, Belk AD, Belk KE. History, development, and current status of food safety systems worldwide. Animal Frontiers. 2018 Aug 30;8(4):9-15. doi: 10.1093/af/vfy016. PMID: 32002225; PMCID: PMC6951898.