Length of time (as you point out) is important in addition to customer density.
I myself am avoiding all restaurants, but if people for some reason that eludes me had to consume meals inside of a restaurant, why should they stay there until the food is ready? Why not wait in the car (or outdoors somewhere) until the meal is served? And of course they should be given the check with the meal so they don't have to linger after eating. Decreasing customer time indoors would also lower the risk of infecting servers and other restaurant personnel.
What we have is not an addiction to indoor dining, but an addiction to habits, even when the habits have been shown to have potential lethal consequences--not just for diners but for everyone they have contact with.