Your full quote is: "Imagine the optics of replacing a sexist old man with another sexist old man. Worth the risk to shareholder value?"
Your statement implied that replacing one "sexist old man" (who we believe to be a sexist by something he said) with another "old man" is a risk to shareholder value because that replacement, by virtue of being a man and/or old, will also be a "sexist".
Your statement is passing judgment on a potential candidate without knowing anything about them simply based on their potential gender. That is definitionally sexism, the same sexism you are identifying as a risk to shareholder value. Perhaps you didnt mean it that way but that doesnt change the valid interpretation of the statement. The irony is that this sexist statement was made in a thread about an article of a guy who made a sexist comment (that cost him his job).