For the first sentence [que l'est Benoît.] :
- The meaning is the following: "Stephane is as tall as Benoît is.".
- Based on that, [l'est Benoît] means "Benoît is".
- Then, [l'est] is composed of a personal pronoun "le" elided and of the conjugated form "es(t)", auxiliary être in the 1st or 2nd person of the present indicative.
For the second sentence [comme le ferait un fou.] :
- The meaning is the following: "He speaks like a madman would do.".
- Based on that, the subject is "un fou" and le is attribute of the subject un fou
To represent a name determined by the definite article (le, la, les), by the possessive (mon…) or by the demonstrative (ce…), grammars recommend the use of the variable pronoun le, la, les and not not the neutral pronoun.
- le does not "replace" anything in the English conversion of the french sentence; it's a reminder of grand indeed and it's attribute of the subject Stephane. This is not unusual to use le in that way, it's just one of the grammatical ways of writing a sentence in French.
Elle est aujourd'hui infirmière, mais elle ne l'a pas toujours été.
- l' means infirmière and it's attribute of the subject elle.
For the second sentence, le is direct object because it answers to the question "Who ?". Who's talking like a madman ? It is the subject: Il.
COD pronouns replace a person, animal, or thing name. This name or nominal group has the function of direct object complement or COD. It answers the question "who?" "For a person or an animal, and" what? For one thing.
Here's some example you can find in linked sources:
Il pense que demain il fera beau ? Oui, il le pense.
Tu écoutes le professeur ? Oui, je l’écoute.
Il parle comme le ferait un fou.