"Spring Guns" and traps are unlawful, and if a thief is hurt, you can be held liable both criminally and civilly. The reason is that there may be a lawful reason for entry... police, fire, emergency, etc.
A spring gun is where you place a rifle on a chair aimed at the door with a string tied to the trigger. The thief breaks in, and pow!....
Attaching a .47 microfarad capacitor circuit to the steering wheel will leave a thief quivering on the ground, but is illegal in most jurisdictions. Cannot show intent to steal, perhaps the person making entry is responding to some emergency, fire truck needs to get by, stuff like that.
Attaching one to the ignition up under the dash... now that is arguably a different situation, since the thief is now already fully in the car and the intent to steal is clear.
Deadly force may not be used in the prevention of theft or the recovery of property, unless the thief has placed your own life in danger.
However, necessary force, short of deadly force, may be used, including physical force.
Therefore, an electronic device designed to stun or debilitate a thief in your car beyond a radius of 50' from where it was parked is lawful, so long as the guy doesn't die or suffer truly grievous bodily injury, like permanent blindness or loss of limbs . But, he can be hurting pretty badly when the cuffs are put on.
Anybody that tries to steal my car is gonna have some real stories to tell his bro's in the joint.