Of course. Most authoritarian regimes intentionally castrate their armies, kill promising generals and remove authority from officers, because otherwise they get military coups.
That's the secret power of a functional democracy: it can empower the military.