I've actually toyed around with a similar idea while implementing the EU2012 skills.
Some of the things you describe (set ammo count to 0, check for weapon in hand, check for unit type, apply stun damage) can already be done via ModScripts.
Most of the other things you describe would require changes to the codebase. When it comes to changing the source code, I am most of the time in favour of not implementing a specific feature, but enabling modders to implement such a feature by creating the needed parts.