The technology to do this effectively for a small torpedo, and giving it any range is immense...much more so for a full sized submarine.
As to defense against it, while in high speed supercavitation mode, it is going o be loud. Creating any disturbance in font of such a vessel (or torpedo for that matter) will collapse the cavity and the vessel will destroy itself on hitting the water.
The key against a torpedo would be reacting quickly enough to do that before the very fast weapon gets to its target. That was a major thrust of the defenses the US Navy had to develop in my fictional book, Dagon’s Fury: Word War against America and the West.
With a large submarine, you have to find it, and then prosecute it accordingly.
At this point the Chinese seem to be talking about a commercial operation...but how they could hope to compete financially against air travel is beyond me.