You are probably thinking of On the Origin of “Oops!”: The Language and Literature of Animal Disease by Ray Malewitz claiming it came a gradual shortening of the word “ooperzootics” (epizooty, a disease affecting many animals at the same time) to “oops” between 1872 and 1921.