George Carlin’s great-grandfather probably told that riddle.
The Satan, as originally conceived by pre-Exilic Israelites, appears to have been the angel charged with testing humanity – the idea of free will being something we may want to get into in another thread, but the basic question being, will one stay in allegiance to God and “righteous” under temptation to do otherwise? He was, effectively, God’s Q.C. department.
Probably under the influence of the Zoroastrian conception of Angra Mainyu (Ahriman), the “evil god” of their dyarchic theology, this conception turned to that of an archangel in rebellion against God and trying to lure as many away from Him as possible.
But, bottom line, under either conception, and if he is in fact real, he operates under God’s sufferance. God could by fiat remove all his powers, whatever they may be, or completely annihilate him.
I think the basic O.P. question is one of those that appear quite sane but end up being of the same nature as “How high is up?” The question of whether God can make a mistake depends on who defines “mistake”. Under the idea that “the King can do no wrong” (seriously raised with reference to the British monarchy over in GQ recently), then clearly He cannot. However, if one arrogates to oneself the definition of “mistake,” then clearly He can by your definition. However, as between a fallible human’s concept of what constitutes a mistake and His own, I think any sane human who first presumed the proposition of God’s actual existence, omniscience, and omnipotence would opt for His definition. (I.e., if you deny the existence of God, the entire question is meaningless, on a par with a serious discussion as to whether the Invisible Pink Unicorn favors clover or timothy as fodder; if you for the sake of argument allow it and also His omniscience and omnipotence, then I’d say you have to favor His definition of “mistake” over anyone else’s.)