In the sixteenth and seventeenth centuries the pronoun "who" was used in this kind of clause "” called a nominal, independent, or fused, relative clause "” in this position in a sentence. Early examples, from Google:
Who steals my purse steals trash; 'tis something, nothing. 'Twas mine, 'tis his, and has been slave to thousands; But he that filches from me my good name Robs me of that which not enriches him And makes me poor indeed.
Author: William Shakespeare
Source: Othello the Moor of Venice (Iago at III, iii)
Who steals a bugle-horn, a ring, a steed, Or such like worthless thing, has some discretion; 'Tis petty larceny: not such his deed Who robs us of our fame, our best possession.
Author: Francesco Berni
Source: Orlando Innamorato (canto LV)
Since that time the word "who" in such clauses in this sentence function has been largely replaced by the indefinite pronoun "whoever," especially when it refers to an unknown, indefinite individual.
The nominal, independent, or fused, relative clause is called by these names because the headword consists of a noun/pronoun plus a relative all in one word. In the head word both the pronoun and the relative word are "fused" together into a single word. "Who" stands for "the person who"; "what" stands for "the thing that"; "where" stands for "the place where," and so on.
Nominal relative clauses are seen in this kind of sentence:
"” Whoever stole my laptop has ruined my career! (WHOEVER = the person who)
"” What caught my attention was the diamond in her front tooth (WHAT = the thing that)
"” Where we went last night is none of your business (WHERE = the place where)
The pronoun "who" is, however, alive and well in sentences after a preposition, as you saw in Gisele's Google examples and as you can see in these Google examples:
"” They're offering me the job only because of who my parents are
"” When the knock came at her door, she issued an invitation to come in automatically, assuming that it was one of her dorm mates. She was therefore totally unprepared for who entered the room.
"” And remember–if you don't vote, you have no right to complain about who was elected.
"” "As a pitcher, you just need to take it as it comes. If I got upset about what happened behind me, I wouldn't be able to concentrate on who was at the plate."
"” All of this was very interesting. He was going to focus on how interesting it was, so that he didn't have to deal with who was sitting beside him.
So "who" is at home in a nominal relative clause after a preposition. It's also at home as subject complement:
"” The mysterious male benefactor turned out not to be who he was rumored to be
"” The murderer turned out not to be who we thought it was
Modern grammar offers three options for Gisele's sentences: One could use the pronoun "whoever":
1a - WHOEVER thinks he knows it all is deluded
2a - Beware WHOEVER thinks he knows it all
3a - The most untrustworthy person is WHOEVER thinks he knows it all
4a - Seeking the wisdom of WHOEVER thinks he knows it all can lead to trouble
Alternatively, one would use either 1) "the person" or 2) a personal pronoun in the appropriate case form, plus a restrictive relative clause:
1b - THE PERSON /HE who thinks he knows it all is deluded (He = grammatical subject)
2b - Beware THE PERSON/HIM who thinks he knows it all (HIM = direct object of "beware")
3b - The most untrustworthy person is THE PERSON/HE who thinks he knows it all (HE = subject complement)
(Most speakers would say "...is THE ONE who..." to avoid using the formal HE.)
4b - Seeking the wisdom of THE PERSON/HIM who thinks he knows it all can lead to trouble (HIM = object of preposition)