Islam does not teach that a person earns Paradise as a wage, nor that Allah's final judgment is unpredictable. It teaches that salvation is received through Allah's mercy, while faith and righteous deeds are the evidence and means by which that mercy is sought.
The strongest form of the objection
The critic's point has force if Islam is described as a simple balance sheet: good deeds on one side, sins on the other, with no believer able to know which side will prevail. On that picture, even sincere worship leaves a person anxious, while the Christian claim of assurance seems to offer a settled relationship with God.
Islam does deny that ordinary people may declare themselves certainly saved merely because they have performed religious duties. A person's sincerity, repentance, hidden sins, and final state are known fully only to Allah. That is a real difference from doctrines that promise salvation on the basis of a particular profession or status. But the objection becomes misleading when it calls this a purely "works-based" scheme.
Deeds are not a price paid for Paradise
None of you will enter Paradise by his deeds alone. They said, "Not even you, O Messenger of Allah?" He said, "Not even me, unless Allah covers me with His grace and mercy."
Sahih al-Bukhari and Sahih Muslim
This does not make deeds irrelevant. Faith, prayer, repentance, charity, and moral conduct are commanded, and Allah promises Paradise to those who believe and obey Him. Rather, deeds are signs of faith and causes through which Allah grants mercy; they do not place Him in a debtor's position. A small act may be accepted and greatly rewarded, while a large act may be ruined by hypocrisy.
Say, "O My servants who have transgressed against themselves, do not despair of the mercy of Allah. Indeed, Allah forgives all sins. Indeed, it is He who is the Most Forgiving, the Most Merciful."
Quran 39:53
At the same time, the Quran teaches believers to combine hope with humility. They neither despair of mercy nor presume that their own record guarantees anything. That balance protects both from despair and from spiritual complacency. Allah's judgment is not random: He knows every intention, wrong, repentance, and circumstance, and He wrongs no one.
What assurance Islam actually gives
A Muslim can have genuine assurance of Allah's promise, confidence that sincere repentance is accepted, and strong hope of Paradise. The Quran also gives definite promises to particular categories of believers, and revelation explicitly confirms certain individuals. What Islam does not give is permission for every person to announce, without revelation, that his own final judgment is guaranteed.
Quran 20:38 concerns Allah's special care for Moses (PBUH) from childhood; it is not a general verse about salvation assurance. The objection therefore establishes that Islam rejects presumption of personal certainty. It does not establish that Islam offers no settled hope, or that salvation is earned by works alone. Its position is morally serious and spiritually hopeful: serve Allah faithfully, repent when you fail, and rely on His mercy rather than on your own record.