This is one of these things that sound easy as long as you don't think about the details :)
Annihilating planets takes a lot of energy. For example if our Sun goes supernova it will maybe kill all life on Earth, but the planet will still exist.
If you gather enough energy to potentially annihilate a planet in each star system in a galaxy - you won't need to worry about any civillization becoming a threat in the first place, because they won't have any energy left to become that threat :)
Then there're the problems with relying on autonomus system with such energy at its disposal, and the problems with dealing with genetic/cultural drift. What if your species diverges into several ones that start fighting each other - which one is the one that's supposed to be protected from the other? What if different parts of this system disagree?
Who gets to push updates to the code of this system? How do you supervise this? Imagine a military coup or constutitional crisis and you're the guy that keeps the ssh key :)
Are distant colonies that get independence and develop on their own a threat? Would the regions that want autonomy agree to this? Or if this technology exist - wouldn't it be used for wars inside that species long before they can start to worry about the so-far-uninhabited rest of the Galaxy?
Would they even survive long enough to create this?
Imagine Sumerians created such system on Earth and it wakes up after 5000 years and asks us for password in some dead language or else :) Now change that to 1 000 000 years.
In my opinion it's very unlikely something like this ever gets created simply because of all the coordination and trust issues, the energy and technology dependencies, the probability and severity of problems it can cause vs the problems it can solve.
Wasting significant percentage of energy of the galaxy and risking destroying it accidentally just to save yourself some diplomacy sounds like the ultimate tech solution to people problem :) And you're not really avoiding the diplomacy, you're just doing it upfront - internally. I'd be very surprised if there were no wars caused by someone trying to implement such idea.
Imagine writing a proposal to Congress or EU to start doing this :) And how Chinese and Russian would react.