Yes, the "punishment" that exists for users who leave a large number of "unfriendly or unkind" comments still applies when the comments are left on deleted posts.
That's a bit of an overstatement, because there isn't really such a "punishment". But the response mechanism that does exist continues to work in the scenario you describe.
Allow me to elaborate: What happens in the scenario you describe is that deletion automatically marks all pending flags on comments as "helpful", similar to what would have happened if a moderator would have manually deleted those individual comments in response to a flag. Then…nothing else happens, unless and until the system detects that a user has a pattern of leaving abusive comments, then moderators are notified, allowing us to manually review the comment history and reach out to the user as appropriate.
This is somewhat hand-wavy, as I don't intend to disclose the exact pattern that signals moderators of potential comment abuse. The larger point is that, yes, we'll still find out.
I would like to see this improved so that "harassment, bigotry, or abuse" flags on comments don't get automatically cleared when the associated post is deleted. These, if correct, tend to be so bad that they require immediate moderator attention. If you see a comment or two that rises to that level, and it looks like the associated post is about to be deleted, please feel free to raise a custom moderator flag on the post (i.e., not the comment) and point us to the comments. Make sure to be clear about what you're actually flagging, or you'll confuse us. Unlike flags on comments, custom moderator flags on posts are not automatically cleared when a post is deleted.