I think your having asthma is a very legitimate reason to be wary of spending significant time with someone who has a respiratory illness. I also think your cousin's behavior (sitting in the public area of the house and socializing, rather than staying in her room) was unnecessarily putting you and your grandfather at risk.
So in that specific situation, I think what I would do is let your cousin know that, given your own health issues, you aren't able to care for your grandfather when she or her husband are sick unless they are unable to leave their room. By that you would mean that if your cousin sat around socializing while you were there, you would let her know that you were unable to stay since she was feeling well enough to keep your grandfather company, and then you'd leave.
I also would let her know that if contagion is a concern, you're happy to drop off the food you would otherwise have made for your grandfather, since you live next door. You just can't stay unless they are too sick to keep your grandfather company.
Finally, I think it might be worth having a family meeting (or talking to your grandfather, or whatever approach makes the most sense for your family) to discuss what happens when your cousin or her husband is home sick. Because truly, if they are sick enough to need to stay home from work because they have a contagious illness, they are too sick to be socializing with your grandfather or anyone who is caring for your grandfather. The risk to your grandfather is a primary concern, and it isn't fair of them to expect family members caring for your grandfather to expose themselves to illness unnecessarily. If there is anyone capable of laying down the law here, I think you should see if you can convince that person to do it.