In the UK if any action is causing distress to someone I think the police are allowed to stop you doing it (based on a naive reading). There are some pretty general laws on our statute books.
But it’s certainly true that the police can majorly inconvenience you. They can take your camera away and even though they have to give it back to you and are not allowed to delete anything that they can do that at all does suck. At least they cannot fine you or worse.
The most annoying thing is that many in the police seem to be unaware about the law. (They strangely never seem to have that problem when a law gives them more power.) They will lecture you on and on about personal rights even if those are irrelevant as long as you don’t plan to make the photos public. (And even if you, say, documented police brutality a newspaper could print the photo no problem, they would just have to pixelate faces.)
They might even not be allowed to look at your photos without a court order (since looking at your photos is a search – I’m not sure about that one).
They can only keep your camera around as long as they plan on using it as evidence – meaning that if there is no investigation or as soon as the investigation ends or after the court is finished with the case they have to give it back to you (unchanged if the court doesn’t rule otherwise – which it won’t).
The good news is that the police in Germany cannot make you pay a fine or get you into prison for taking photos of them. The bad news is that they can inconvenience you by temporarily taking away your camera. Which they can do but as soon as they delete so much as one photo you should defend yourself and sue.