The devil always gets the worst defeat. What he does against God only ends up to be his own revelation of his own weakness and inability to cope with God’s power. Someone sins seven times, but God forgives and forgets. All that this reveals is God and not the devil. The three Hebrew boys of Daniel 3 were put in the furnace made seven times hotter. The purpose was that they might be killed. But all it did was reveal the Fourth Man. The devil excited the leader to put Daniel in the lions’ den. The purpose was that he might be eaten up. But all it did was reveal the prophet’s faith-rest in God while the lions refused to eat that night.
The devil projected the stimuli to persecute. The purpose was to put Paul and Silas in prison and stop God’s work. All it did was bring an earthquake, and get the guard saved with his family.
David sinned wickedly and God chastised him. But he and Bathsheba had a son, Solomon, who became the wisest man on earth in human terms. The devil got David to do something wicked, but it ended up blessing the whole world with wisdom. Though the sin was completely wicked, through it was revealed the mercy of God in life against the devil’s tactics to destroy the king.
How frustrating it must be to be the devil. You think you have the situation in hand and you end up being mocked by the weakness of men who are empowered by God. God uses the devil’s tactics as tools to reveal Who really has the power and the last say.