I completely agree. With so many high profile cases of people suffering from some form of dementia being elected to important offices (McConnell and Feinstein; Biden and Trump), it's clear that the intended electoral mechanism isn't working to replace people who are not fit to serve. Name recognition & incumbency advantage are just too strong to allow the right thing to happen.
The version of the fix that I like is, if you would be 65 or older on the day you would begin holding the office, you are ineligible to be in the election or the appointment process. This gives some room for acknowledging that there isn't a clear cut-off where one immediately becomes unfit to serve. If you're a healthy 64, you can serve all the way to 70 for an office with a lengthy term; but if you're going soft at 65, then you don't need to make the difficult decision of whether or not to run. The decision has been made for you, way ahead of time, and you can make plans to retire and support a successor, avoiding a really nasty, personal primary process.
This would have nicely avoided Biden's awkward "will he, won't he" decision that led to the 2024 disaster we're still suffering from. Feinstein & McConnell would have retired well before their brains transformed into cottage cheese, turning them into jokes and destroying whatever legacies they worked to build. It's better for everyone.