Are we all either among the sheep or the goats? I infer from the parable that all of the sheep did good works and I guess I can go along with your reasoning that their works only counted because they were done in the name of Jesus. But wouldn’t that disqualify a death-bed conversion (assuming you believe in that).
I know I ask a lot of questions but I do agree with the great Catholic convert John Henry Newman who said that a 1000 questions doesn’t make a doubt.
Scripture can be quite fun, can’t it? There are lots of mysteries and so little time.
Do you believe in universal salvation? Works done without Christ have no reward. Salvation isn't that reward, salvation is a result of the sinner being justified by Christ. The sheep are sheep because they have been justified, not because they have works. The works of the sheep are those things that God had prepared for them to do in advance as Ephesians says.
As for the 'deathbed conversion', the thief on the cross is a prime example of that, where were his works? He was with Christ after death, because he believed. Men aren't capable of knowing if a conversion at death is real, but God knows and that is the only thing that counts.