You are wrong that you need centralized military, as that is easily compromised. The only modern example of what does work is Switzerland right in the center of Europe never got invaded because they have militias (ordinary people part timing) that would snipe any invading general who dares to enter their country. America was supposed to be that way but failed at it