The maximal time needed for such a lock-down would be something like a month at most 2 months (Wuhan started the lockdown on 20. Jan, on 26. Mar there were no more cases), even without fast PCR testing nor vaccines.
With a fast PCR testing infrastructure, you might not even need to lock the people up.
And you don't need a world government to do that. There could be COVID-free bubbles vs the rest of the world.
Honestly, all the essential travels could tolerate a 3 weeks quarantine. Business could be conducted remotely. We have internet after all.
Neither the US, nor its porous-border neighbor Mexico, is likely to accept any such measure.
And even areas that had fair bubble-like control early, like Iceland, New Zealand, & Australia have now given up on that goal. They have the most experience with such a strategy – and no longer believe in it.
File this plan away for when you're world dictator.
How long would elections, the right to travel, & the right of protest need to suspended, worldwide, for this plan to work?
(Personally, that plan sounds even more expensive, to me, than a total "let 'er rip" strategy.)