Beyond the initial challenges of figuring out how a collar can precisely and accurately predict when an animal is about to begin a specific type of attack and then react before enough damage can be done, you've also then got to be able to refill the pepper spray throughout the animal's life, ensure that each and every animal born into each and every pack gets a collar, etc.
Just seems wildly unviable.
Edit: There's also the nuance around the fact that the wolf has to eat at some point, and usually this will involve killing another wild animal. The collar would have to be able to accurately differentiate between "allowed to kill" and "not allowed to kill", which seems... difficult. I'm not sure that a simple bit of geofencing or whathaveyou would be good enough in these situations.