For me, I process it this way in my brain:
1. Did I say anything wrong? No?
Then just say “excuse” or “pardon me” but not to “apologise” or say “sorry”.
* If they still don't accept it, then they open up an opportunity for me to explain, and I will explain.
2. Was it intentional on my part, even slightly?
Then, yes, I'll apologise. My usual spiel “I'm sorry, I truly am, it was uncalled for” or “I'm sorry, the situation just didn't sit right with me”. No further explanations, just that.
If they want me to be detailed, then I tell them “I won't explain in details because then it will sound as an excuse and more likely than not, you'll tell me I'm making excuses”. ^_~
3. This one I avoid. I'll apologise anyway if it will be for their peace and happiness.
While it sounds “good”, I consider it empty and fake, and open for abuse and misinterpretation.
This option is like showing to people who don't understand us, autistics, that we were indeed wrong and they were right. When in reality, we were just being peaceful or reconciliatory, but they understood it differently.