I read or heard something about this recently in connection with some etymological deep dive someone was doing. I can’t remember any details, unhelpfully.
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.