I believe there have been studies into how social life impacts longevity, and probably cognitive decline as well. For some people, like my great-grandmother who kept working well into her 80s by choice, jobs can be a big social outlet. For others a job can be very socially isolating. Those factors probably matter a lot.
Side note: I'm sure we'll see research into these areas used to propose delaying retirement age more in the near future.
Your side note implies this would be a bad or nefarious thing? What if it's actually a good decision for both individuals and the public at large?
Yeah I work from home. Except for 1-2 short zoom calls a day or talking with my wife, who also works from home, I can go pretty much the whole week without talking to anyone. I try to make sure I go out with friends at least once on the weekends, though, to sort of make up for it.
But I do wonder if that's going to be a bad thing for me later in my life.
But I also play a lot of board games, including somewhat complicated solo card games, in my spare time. So I'm hoping that helps counteract things a little bit too.