"But few have a true sense of what is comprised in the word Christian. It is to be Christlike, to do others good, to be divested of all selfishness, and to have our lives marked with acts of disinterested benevolence. Our Redeemer throws souls into the arms of the church, for them to care for unselfishly and train for heaven, and thus be co-workers with Him. But the church too often thrusts them away, upon the devil's battlefield. One member will say, “It is not my duty,” and then bring up some trifling excuse. “Well,” says another, “neither is it my duty;” and finally it is nobody's duty, and the soul is left uncared for to perish. It is the duty of every Christian to engage in this self-denying, self-sacrificing enterprise. Cannot God return into their granaries and increase their flocks, so that instead of loss there shall be increase? “There is that scattereth, and yet increaseth; and there is that withholdeth more than is meet, but it tendeth to poverty.” 2T 331.1"
"And the King shall answer and say unto them, Verily I say unto you, Inasmuch as ye have done it unto one of the least of these my brethren, ye have done it unto me."
The EGW passage directly quotes Proverbs 11:24 and connects it to the idea of caring for others, echoing the sentiment of Matthew 25:40 about ministering to the 'least of these'.
But every man's work is to be tested, and brought into judgment, and he be rewarded as his works have been. “Honor the Lord with thy substance, and with the first fruits of all thine increase: so shall thy barns be filled with plenty.” “Is not this the fast that I have chosen? to loose the bands of wickedness, to undo the heavy burdens, and to let the oppressed go free, and that ye break every yoke? Is it not to deal thy bread to the hungry, and that thou bring the poor that are cast out to thy house? when thou seest the naked, that thou cover him; and that thou hide not thyself from thine own flesh?” Read the next verse, and notice the rich reward promised to those who do this. “Then shall thy light break forth as the morning, and thine health shall spring forth speedily.” Here is an abundantly precious promise for all who will interest themselves in the cases of those who need help. How can God come in and bless and prosper those who have no special care for anyone except themselves,…
"For the Son of man shall come in the glory of his Father with his angels; and then he shall reward every man according to his works."
The EGW passage discusses rewarding people based on their works and quotes Isaiah 58:6-8, which is about helping the needy. Matthew 16:27 also discusses rewarding people based on their works. The connection is thematic, not a direct principle.