I still don’t understand how she “deserved” to have you escalate the encounter with a “hard” physical spanking; nor do I understand how, if you spanked her in a joking context, you would consider it punishment or “some measure of revenge.” From what you’ve said, it doesn’t seem like you were on sufficiently friendly terms with her that the spanking was in fact treated as teasing/joking action; you previously stated that she was not amused by the spanking, her brother threatened you, and you apologized.
I’m certainly not trying to say that her behavior wasn’t worthy of serious disapproval and verbal disparagement. But responding to her poor behavior with physical actions rather than words seems at least equally inappropriate.
Followup to: Do you have High-Functioning Asperger's Syndrome?
LW reader Madbadger uses the metaphor of a GPU and a CPU in a desktop system to think about people with Asperger's Syndrome: general intelligence is like a CPU, being universal but only mediocre at any particular task, whereas the "social coprocessor" brainware in a Neurotypical brain is like a GPU: highly specialized but great at what it does. Neurotypical people are like computers with measly Pentium IV processors, but expensive Radeon HD 4890 GPUs. A High-functioning AS person is an Intel Core i7 Extreme Edition - with on-board graphics!
This analogy also covers the spectrum view of social/empathic abilities, you can think about having a weaker social coprocessor than average if you have some of the tendencies of AS but not others. You can even think of your score on the AQ Test as being like the Tom's Hardware Rating of your Coprocessor. (Lower numbers are better!).
If you lack that powerful social coprocessor, what can you do? Well, you'll have to run your social interactions "in software", i.e. explicitly reason through the complex human social game that most people play without ever really understanding. There are several tricks that a High-functioning AS person can use in this situation: