I'm mildly on the spectrum, and my view toward punishment as a kid is that it was misguided as well. I don't think it harmed my relationships with my parents, exactly (not directly anyway; the underlying personalities/values maybe), but it definitely introduced me to the fact they were flawed human beings who didn't know what they were doing, which has never 'corrected' in adulthood (i.e., I don't look back and go "in hindsight what they did was for the best", and I'm quite certain that if I behaved similarly due to stress/fear, I'd be apologizing for it immediately after).
Rather, what I was constantly looking for (and still am), was the "why" of things. Attempts to influence my behavior without first influencing my understanding led to friction and were the reasons they tried punishment (which never really worked). I didn't generally go out of my way to disobey them, but if we were at odds they had to explain it well enough for me to understand where they were coming from. This worked better with my mom who seemed to have a better understanding of my needs; my dad was more authoritarian and seemed to expect me to just listen due to the nature of the relationship (which in hindsight is funny, as while he is very much "the rules are the rules" when it came to other people, as soon as he had a reason he felt was good to disobey them, he would; he never really empathized with "other people might have good reasons to disobey the rules or otherwise feel they're unfair too", which helped me understand his political leanings).
Rather, what I was constantly looking for (and still am), was the "why" of things. Attempts to influence my behavior without first influencing my understanding led to friction and were the reasons they tried punishment (which never really worked). I didn't generally go out of my way to disobey them, but if we were at odds they had to explain it well enough for me to understand where they were coming from. This worked better with my mom who seemed to have a better understanding of my needs; my dad was more authoritarian and seemed to expect me to just listen due to the nature of the relationship (which in hindsight is funny, as while he is very much "the rules are the rules" when it came to other people, as soon as he had a reason he felt was good to disobey them, he would; he never really empathized with "other people might have good reasons to disobey the rules or otherwise feel they're unfair too", which helped me understand his political leanings).