not a bad idea… something manually controlled but otherwise similar already exists, the "bug-a-salt" gun. https://www.bugasalt.com
You don’t want to put kilograms of it in your garden, but this device is not consuming anywhere close to that amount of salt. It holds about the quantity of a salt shaker of salt, and can be fired 80 times from that amount.