CoCs are like HoAs. The people behind them are usually well-intentioned, and they certainly have their place, yet they're still quite dangerous. If the wrong kind of person gets into a position of enforcement, they can basically do whatever they wish, with no due process, recourse or principles of law being observed.
This is not a problem with CoCs, but authority in general.
A CoC is still a useful communication tool. Guidelines are useful to have.