My personal favorite of low-tech solutions is to kill so many of the people of an attacking nation or ideology and destroy so much of their infrastructure as to make it blatantly obvious that screwing with the US isn’t in ones best interest.
Works for me...
I think China somewhat lives outside of reality. I honestly think they’d give up half their populace if they thought they could come out on top.