“ Philadelphia had scheduled a big Liberty Loan parade for September 28. Doctors urged Krusen to cancel it, fearful that hundreds of thousands jamming the route, crushing against each other for a better view, would spread disease. They convinced reporters to write stories about the danger. But editors refused to run them, and refused to print letters from doctors. The largest parade in Philadelphia’s history proceede…
For the USA at least, wouldn't imposing a ban rather than a recommendation be a violation of the Constitutional right to freedom of assembly?
To satisfy it, the government has to show that it has a compelling state interest and that their solution is narrowly tailored to serve that interest.
Curfews for public safety after natural disasters like fires and floods, or to prevent spread of disease, or in times of extreme civil unrest like riots have been found to meet the strict scrutiny standard.
Since a ban on large gatherings is less of an imposition on your freedom of assembly than a curfew, I'd expect that it would be allowed.