Casual use of a racial slur is a way to load the dice in your favor. If a generalization is true, can it be "ageist"?
Yes, old, out-of-touch engineers exist. There are women in the world who can't do math. There are black people who steal. There are alcoholic Native Americans. There are programmers with Asperger's. But lumping an individual person into those stereotypes -- especially in the workplace -- is just asking for a lawsuit.
Do you see nothing wrong with the phrase, "You're just another out-of-touch old man"? Besides just being flat-out mean, it's also so devoid of any specific meaning as to be blatantly discriminatory.