Jesus knows EVERYTHING about Christianity! I'm surprised you don't know that. So does the Apostle Paul, to whom Jesus revealed the gospel of the grace of God which is the good news that we do not obtain salvation on the basis of our good works. That's why it would be the devil who perverts the good news by convincing souls they can earn or merit their salvation by the works they do. Such a "gospel" would condemn the person who believed that because they would not be depending upon Jesus Christ as their savior, preferring to trust their own merit.
Regarding those who go about trying to establish their own righteousness, Paul wrote:
The passages you quote out of context don't prove what you say they do. The "sheep" and the "goats" went into that judgment already either a sheep or a goat. This judgment didn't determine that. Sheep do what sheep do and goats do what goats do. Which one are you?
Jesus, of course, knows before the actual Judgment who is going to be damned and who is going to saved. It is Jesus who separates the sheep from the goats.
I would like to see some evidence that the separation into sheep and goats is the consequence of some criterion OTHER THAN and PRIOR TO the criterion “you fed me, you clothed me” and “you did not feed me, you did not clothe me.” So far, I’ve seen it asserted, but without any evidence.