They can shut them down by stopping shipments to the USA. Are you really that dense?
The problem is not who owns the docks. The problem is that we are no longer a manufacturing economy but a consumer economy.
You are really fucking dumb. It's not just imports.
There are exports ( raw material, machinery, food being the big 3)
Loading provisions on US Merchant Marine ships
Loading Provisions on US Navy Ships
Loading Provisions on allied ships
Sending supplies to allied nations
Sending supplies to us bases overseas
And about 100+ other situations where these ports would be used to execute actions against a nation state who owns and controls them. You don't think a Chinese automated system could be sabotaged or remotely destroyed should they need to shut us down?
There is no magic us navy base where it's gov personal doing the rigging, Loading, crane ops for ships. It's all longshoreman...either union on the economy or union contracted gov for sensitive sites.
We have allowed the enemy to control our means of waging war. All the ships tanks jets and soldiers don't mean jack shit if you can't manage the log train...and longshoremen and our ports are a critical link in that chain.
Seriously you can't be this fucking stupid.