I think China already did that. I don't see it would be a problem to deal with taliban regarding the investment, in term of geopolitics, they are much more rational than ISIS. The question is what taliban will do regarding the uyghurs rebels. Will taliban provide a sanctuary for them? or will it help China crack them down? I doubt they will help China crack them down, being an islamist as they are. Then what will China do?
Another thing, I doubt taliban can take over Afghanistan completely. There are several powerful warlords that will probably keep getting the supplies they need from uncle sam. They might even take control of one third to half of afghanistan. How will China deal with them? In civil war, it is either them or us.