You need political will for this and for enforcement to take it seriously, since the technology to do so is almost trivial nowadays.
Governments break their own rules all the time, warrants get rubber-stamped, and “heavy fines + prison time” magically evaporate when the offenders are the state or its contractors. The technology isn’t the hard part - it’s the fact you can’t meaningfully enforce limits on a system whose entire purpose is to watch everyone, all the time. You don’t make mass surveillance safe by adding a padlock. You stop it by not building it.