If they are mashing just back up and punish with long range pokes. You cant try to properly engage random flailing, thats why just mashing works so well, way more than anyone likes to admit.
So just back up and let them flail then wait for an opening to punish. Dont try anything complicated...