Retiredwell. Some of my family live in Western Australia. They closed their borders as soon as it became clear that an epidemic had begun. Only essential people were allowed in. Delivery drivers had to obey strict rules about how to make their deliveries, with minimal contact. Quarantine rules were put into place very quickly.
As a result almost all the Covid cases were people from cruise ships and planes, who had been isolated as soon as they arrived. There have been almost no cases in the general population.
They have relaxed the internal admittance rules slightly now, but are still using strict rules about who they admit, and to quarantine people coming from abroad,
It can be done, if you act quickly and don’t let half the world in before deciding what to do.