Rob wasn’t sure how to assess the sentence: “Is ‘him’ the object of ‘to’?” he asked. “Or is ‘he’ the subject of ‘who waits’?”
As Rob knows, prepositions like “to” take objects, which are always in an object form like “him” and are never subjects like “he.”
But as Rob also knows, clauses have subjects like “he.” In “He waits,” notice that a subject is doing the waiting. An object form like “him” wouldn’t work here.
Sometimes a pronoun, especially “whoever” or “whomever,” can land in a position where it appears to be doing both jobs at once. Look at “I’ll vote for whoever/whomever supports pothole repair.” Here we need an object of the preposition “for” but we also need a subject for the verb “supports.”
What to do? Actually, in this case a whole clause is functioning as an object. And that clause needs a subject. So the correct choice is “I’ll vote for whoever supports pothole repair,” in which “whoever supports pothole repair” is a whole clause serving as an object of “for.” In these situations, the subject form wins because clauses need subjects.
But Rob’s question deals with a slightly different sentence structure. The difference is that little word “who.” In “Good things come to he/him who waits,” the subject of the verb “waits” is neither “he” nor “him.” It’s “who.” Together they form something called a relative clause, which is really a modifier of a noun or pronoun that comes before it.
The man who eats pasta. The man who wears black. The man whom I love. In all these cases, the who or whom clause is simply shedding more light on the noun “man.” That’s what relative clauses do.