It's not actually clear to me that Biden is mentally unfit for the job.
Certainly there has been some decline; watching videos of Biden in debates in 2012 side by side with 2020, the difference is obvious. But it's not clear that this has been in areas where it's actually necessary. A President doesn't (necessarily) need to think quickly in the moment; they need to be able to listen to the correct advisors, make the correct connections, be willing to apply pressure to foreign leaders, etc. It's not clear that there's any particular role of President that Biden is failing at due to his mental state.
All of this is yet another point in favor of your broader one. You say:
> Institutions are so strong that you can elect a vegetable and the country runs pretty well.
I say, institutions are so strong that you can't tell if you elected a vegetable. Biden is by no means the first in such a situation; Reagan notoriously was showing signs of Alzheimers by the end of his presidency, and the day-to-day was run by Nancy with the country none the wiser.