At modern scale, pilgrimage is a logistical and political undertaking, and the religious content cannot be cleanly separated from the administration of it.
The hajj is capped and rationed. Saudi Arabia allocates quotas by country, national bodies run lotteries or waiting lists that in some countries run to decades, and the operation, transport, the tented city at Mina, water, sanitation, crowd flow at the stoning and around the Kaaba, is a state project of enormous scale. It has also produced the deadliest crowd disasters in religious history, most severely in 1990 and 2015, after which the infrastructure was rebuilt again. Heat is now the principal hazard, and because the lunar calendar walks the pilgrimage through the solar year, summer hajj seasons recur on a fixed cycle and will do so again.
The Arbaeen walk to Karbala, forty days after Ashura, is by any reckoning among the largest annual gatherings anywhere, with millions walking from Najaf and elsewhere and being fed and housed without charge by households along the route. That distributed, unpaid hospitality is its defining feature and has no close parallel elsewhere.
The Kumbh Mela in India is on most counts the largest single gathering of people for any purpose, held in rotation at four river sites on an astrological cycle. Its attendance figures are produced by state authorities, are heavily contested, and should be read as orders of magnitude rather than as counts.
Smaller pilgrimages are more tractable. The Camino de Santiago issues certificates and can therefore report real numbers, which have risen from a few thousand a year in the 1980s to several hundred thousand, a revival driven at least as much by walking culture and tourism as by devotion. The church that administers the route is openly ambivalent about that, and says so.