Foucault lived when the actual Nazis were in power and saw the rise of eugenics, so I'd bet that has more to do with his relating power and the course of science than "scientists are respectable ergo oppressive". Iirc he was also fairly clear about how his analyses were rooted in observation of actual occurrence, and not an attempt to divine the essence of the idea of science and power.
context, man. it matters.