China is socialist because social ownership is the principal aspect of the economy, and the working classes control the state. It has nothing to do with the name of China, and everything to do with how their society is actually structured, same with the DPRK's form of consensus-based democracy. I don't know why you are pretending I made the claim that China is socialist because they said so, I have never made that claim in my life.
The reason for the firewall is to protect developing Chinese internet infrastructure from competition with more developed western alternatives like Facebook. It's the same reason the US bans Chinese EVs to protect its own auto industry. Thanks to the firewall, China has a much more mature internet than they would have otherwise. This is standard protectionism.
As for the June 4th incident, it wasn't at all peaceful. Rioters around Beijing began lynching unarmed members of the PLA, which prompted state intervention. As for Hong Kong, it was more peaceful than June 4th, but also was countered more peacefully. In both cases, capitalists opposed the socialist system and sparked unrest.