I think this just needs to play out now. The time to contain it would have been when the Chinese authorities were first aware that they were dealing with a novel virus. Once it crossed their borders, there wasn't any putting the genie back in the bottle.
I think building up some sort of immunity is probably all we can do now, obviously attempting to flatten the peak so as not to overwhelm the NHS and save as many lives as possible.
I appreciate that we don't know enough to say that someone who has had it will definitely be immune, as it mutate, but at least our immune systems would then recognise it as similar. For instance, flu among other things wiped out huge amounts of people in the New World when the Spanish arrived, the same disease, whilst not trivial for a small minority, is easily dealt with by the immune systems of most people with a population background of exposure, despite regular mutations.
I just don't see what else we can do. There's only so long and so hard that we can lock down globally before the economic effects become worse than the virus.