Not sure, regarding Portugal I've mostly heard of the good cheap coffee from people from Spain and Portugal.
I myself have been multiple times in Spain and Italy, but not in Portugal.
(Yeah, I should visit Portugal some time... but not in Summer, South Europe is a PITA in summer, I remember melting down in Madrid and Palermo)
In Spain I think I don't really move like a tourist, not really. In Italy probably a little, but still I got great coffee for 1€.
Now, regarding Germany...
I live in Germany since 7 years ago, the places I go are not tourist areas, the shitty coffee at expensive prices is the one a local gets.
If you go to tourists areas expect coffee to be probably more expensive and still shitty.
PS: My suggestion, don't visit Germany for the coffee. Just come here for the beer and sausages. (and in that regard, don't expect good food either because it just does not exist, the beer is good though)
I understand. You should visit Portugal.
By the way, where were you before you moved to Germany ?
By the way, I hope one day I will visit Germany. Love Europe. Its in my blood. No worries.. I always go to my country and Europe for the beers and wine, lol. I am not into sausages.. Too greasy but thanks.