It depends on the particular couple and their level of commitment to one another, and then any arrangements that they might make to deal with it.
Most couples over the age of 70 probably have some level of impairment, in one or both of the parties, so this is a fairly common situation for older people.
There are also couples who get married when one of the parties already has some type of physical impairment.
Then there are couples who have a military member who comes back home with an impairment. So there are plenty of situations in which one of the parties already has an impairment or becomes impaired somewhere down the line. But then it depends upon the level of committment by the couple as to how they will deal with it.
There was a thread on here (which I can’t find, but maybe someone else can) that dealt with a man who had a wife who was seriously ill and could not have sex and we all gave lots of great answers. But both parties have to be in agreement on what is OK.
Could be that the well partner goes elsewhere for sex (with the consent of the ill person) Could be that the well person masturbates in front of the ill person (with the consent of the ill person) Could be that the ill person kisses or touches the well person in a loving manner, but in a way that is physically comfortable or possible for them, and kind of participates in the masturbation. Could be that the well person, goes off in private and masturbates with or without the knowledge of the ill person (so as not to hurt the ill person’s feelings). Could be that the well person uses some type of sex toys (alone) that are more like having sex with a real person than just standard masturbating. And there was a website that I posted (and can’t find) that was dedicated to helping the well partner with all of these issues, it included forums and products and psychological assistance for dealing with the stress, anger and grief.