CCTV can absolutely be made to be effective and protect citizen's privacy at the same time. A legal requirement to store only encrypted data, which can only be decrypted via a court warrant (so a similar standard to searching your home or tapping your phones, not the blanket panopticon they wish to create), plus enforcement and heavy fines + prison time for anyone caught storing unencrypted data.
You need political will for this and for enforcement to take it seriously, since the technology to do so is almost trivial nowadays.