Density is complicated. On one hand, raw population per square kilometer is obviously a useless metric for epidemics. It's trivial to understand that taking a small country with a few cities, and adding a vast uninhabited area will drive people/sq.km towards zero without actually changing the actual density where people live (See Canada, Sweden, Australia and many others).
So it's not people per area. Perhaps a better measure is "mean distance" between people? That means Australia is pretty dense because most people live in dense areas. Urbanization is obviously a much better metric than raw density.
But this also misses another important factor: Australi, and Sweden (which are sparse but urbanized so low pop/sq.qm but low mean distance), unlike the UK is pretty "disconnected". There are clusters with high density, but they are separated by areas of low density.
It's likely better in an epidemic to have 3 cities with 1 million separated from each other, than 30 cities with 100k people each, where people in each cities visit/commute to the next 5 cities. That's what some places like UK/Netherlands/Belgium have. They are extremely dense in the sense that it's always close to the next population center. There are no natural borders or empty spaces.
People from city A work in town B, and some fraction of people in town B work in city C and so on. Towns A and Z are connected by just a few days worth of normal commute for thousands of people.