you are to deliver this man to Satan for the destruction of the flesh, so that his spirit may be saved in the day of the Lord (1 Cor 5:5).
among whom are Hymenaeus and Alexander, whom I have handed over to Satan that they may learn not to blaspheme (1 Tim 1:20).
Given the elliptical nature of these enigmatic passages, we can't be sure what they mean. In his revised commentary on 1 Corinthians, Fee denies that Paul is using an "execration formulation."
Fee thinks this is a colorful metaphor or personification for excommunication. However, a basic problem with that explanation is how excommunication would have a purifying effect on the wayward Christian. He's cut off from the sanctifying influence of Christian fellowship. And that, in turn, leaves nothing to offset the moral and spiritual corruption of his heathen environment.
So it seems more likely that Paul is alluding to the judicial or punitive role that the OT assigns to Satan (Job 1-2; 1 Chron 21:1; Zech 3:1-2).
In effect, he may be hexed. Cursed to suffer a string of bad luck. One setback after another. Things go from bad to worse.
His misfortune constitutes remedial punishment–prompting contrition.
Of course, it is not Satan's intention to restore a wayward Christian to the fellowship of the church. That's a case of God's overruling providence. God uses Satan to achieve a beneficial result in spite of Satan's malicious designs.
I think that's the most reasonable interpretation. God can use misfortune and personal tragedy as spiritual discipline. That can be instigated by Satan, even though the end-result is at cross-purposes with Satan's malevolent intentions.