I think that the idea about philosophy most often being used for the justification for some power structure has its origins in philosophy itself, namely in Nietzsche and Foucault. So I wouldn't call it a problem with philosophy but a philosophical position.
Hegel did directly support the Prussian state and in general like his "reincarnation" Marx, supported totalitarianism. He saw the strong state as some sort of representation of God in the contemporary world.
Not quite sure about Marx, there is the younger one and the older one, and they don't quite agree on a lot of things. But who really knows. Maybe this differentiation
is all made up by the reform communists who want to save the framework of Marxist thought.