Ut sounds like from Matthew 25:40 that Jesus will judge men by their good works. And from 41 on he describes the lack of good works that he will not forgive, not feeding, clothing, or providing housing to those in need. So if a worldly government does these things will he then condemn it, or merely say, OK over to the right hand, I’m taking over now.
The Bible already makes it clear that good works achieves nothing in the way of salvation. That message is so clear that it’s not possible to subvert it.
After one is saved, though (which has nothing to do with good works), there are higher and lower positions in the world-wide government that Jesus is setting up (at that time), on the basis of the good works that one has done, “in Christ” and not on the basis of oneself. The Bible makes it clear that anything that was not done in Christ, through His spirit in you, is worthless and is “burned up” and not counted for anything. Some will be saved — but have absolutely nothing in the way of any rewards in the coming Kingdom on this earth, that Jesus is setting up.
And so, when He returns and sets His feet on this earth, He gathers all the nations for judgment, and those who are saved are found to have treated Jesus’ brethren (the Jews) rightly and they are the Sheep of this judgement. The ones who are not saved are the Goats of this judgment, and they will have treated Jesus’ brethren, the Jews (during that Tribulation period, i.e., the previous 7 years before Jesus came back) as badly as Jesus describes to them.
Thus, right at the very beginning of the world-wide Kingdom that Jesus sets up here on earth, He starts off — right off the bat — with eliminating all the non-Christians immediately (i.e., they are killed right then), and the remaining saved ones, coming out of the Great Tribulation — go into the Kingdom that Jesus came to rule and reign over, for the next 1,000 years until the Great White Throne Judgement in Revelation 20.