Australia and China managed to do this.
All the countries where this worked seem to have the advantage of being geographically and geopolitically distant from Italy, which meant they could take action against their outbreaks at a relatively early stage before they got deeply embedded in society. (Early on, cases were more or less a gradient radiating out from Italy, probably because they had a major outbreak which went completely undetected as in literally reporting zero cases country-wide despite having an awful lot more than that.)
In the past, EU countries did not want to delegate health care to the EU (except for approving medicine). So this would require lots of individual countries (including Sweden and, until this year, the UK) to suddenly agree on a single strict lockdown. Very unlikely to happen.
The real tragedy is that most of countries are following UK and US as their model because most of their government policy makers are trained in US and US, and they don't have the capacity and courage to set out their own plans.
I'm quite surprised that China was able to pull it off, because they're a major trade economy and must have millions of people coming and going. Of course it helps to have a government that can take any action without regard for rights or political consequences.
This is impossible I think for a country like the US with vital land borders and constant trade across them. I think it's also very hard for democratic counties where people have rights.