The typical government response to European Court rulings against surveillance is just to interpret them in some favorable way, then ignore them. So if the court outlaws "mass surveillance" and you've instituted a mass surveillance system, just call it "targeted surveillance" or ignore the ruling altogether. Maybe in 6-7 years you'll get another ruling against that, but it doesn't matter.
Relevant past rulings:
https://dpglaw.co.uk/european-court-of-human-rights-declares...
https://privacyinternational.org/press-release/5120/judgment...