I think that article buries the most interesting part! It's true that "bug" in that sense dates back to the 19th century, but before that, it didn't necessarily mean "insect" - it could mean something like "malevolent spirit", as in Hamlet's "bugs and goblins".
I wrote a little more about this: https://jkaptur.com/bugs/