I do not know exactly what they (China) planned from the start, but seeing from the quick handling they have done on Covid-19 patients has proven that they are the country that is most ready to deal with the Covid-19 virus. it's likely they had predicted this outbreak first..
But what I have to say about this point you raised is that if the information I have is correct, China is the first hit of this virus late last year and we should expect that they would have gone to working on it as early as possible. Moreover, the Chinese economy is buoyant enough and they are proactive people in terms of like this and technology plus they are cooperative nation. So they might have abided by the rules to avoid bitter spread. There was also a time that China suffered more death than every country.
Also, China is not the only country that seem to have controlled this pandemic. I think Korea, Singapore and Germany to my knowledge have really worked against it and I believe soon other countries would come out from it.