On the subject of cognitive decline with age, research has shown that it does occur. It’s not that surprising - our brain cell count declines from the late teens/early 20s onwards.
That same research has shown that added experience more than makes up for it. The sports analogy used by the poster who started this discussion is a really poor comparison; you can be physically incapable of taking advantage of your experience at the pro level by the mid-30s, and earlier in some sports. The mind ages far more slowly.
Of course, this is more true in some fields than in others. It’s quite possible that theoretical physicists working at the limits of our existing knowledge need all the cognitive ability and mental flexibility a human brain can afford - and will have fewer groundbreaking accomplishments later in life, as @DocT noted. The same may be true of pure mathematics. Both are fields where you can train your mind to think a certain way, but there’s only so much that experience will help you with; a 25-year-old and a 55-year-old can understand a theorem just as well, and the 25-year-old may be less set in his/her ways and more flexible, and thus arrive at more new conjectures.
Most jobs aren’t like this, because most jobs involve specific tasks or types of tasks that become much easier with experience. The laws change, medicine progresses, accounting practices are fluid, and the next APA or Chicago Manual of Style may shift the way people who write professionally use the English language. Lawyers, doctors, accountants, and editors/publishers will still be tweaking how they use their years of experience, not throwing those years out of the window.
Where you do see real cognitive decline, affecting work in many cases, is in a person’s 70s and 80s. Because the human body isn’t designed to survive that long, it starts to break down, and the brain isn’t locked up in a magic box that’s immune to this effect. That’s what we’ve seen in cases like that of Ronald Reagan, who was starting to slip by the end of his presidency. On the other hand, there are the Reagans but also the Jimmy Carters, (still going strong at 91).
Nobody with a career dependent on mental rather than physical work should depend on working until 80, because life is full of things that can go wrong or change our priorities. That’s not to say we can’t hope to do so, or that there aren’t people who work as well in their 60s as in their 30s and remain effective well after “retirement age.”