I would like to add the perspective of a native speaker with a few examples.
The key part of the confusing nature of "Guter Mann" is the adjective "gut". In general, obviously, "gut" is a positive adjective. However, when this positive adjective would not really be required in a sentence, choosing to use it anyway puts a spotlight on this particular part of the sentence. This might be used for only a mild comical effect, but it can also be used to clearly point out that you actually mean the exact opposite. In (admittedly rare) cases where using the adjective is not out of place, it can be unambiguously positive, but in other cases it can range from mildly ironic to downright hostile.
Fun fact: This general aspect of German is not limited to "Mann" or even "gut". For example:
Dann hatte ich noch ein bisschen von dem guten Salat aus der Kantine.
Then I had a little of that totally not terrible cantine salad.
There is practically no way to voice this phrase in my mind that can make the salad from the cantine sound actually good. However, I would like to note that the comments below showcase how other native speakers feel completely different about this. It is quite possible that the way these nuances are interpreted also depend strongly on your peer group, certainly tone of voice, and the context.
Another example where the connotation is more comical than sarcastic:
Wir können uns noch ein paar von den guten Backwerk-Brötchen gönnen.
We could treat ourselves to some of those world class rolls from Backwerk.
(a fast food bakery)
Now those rolls may actually be something that the speaker is craving, but it's a little comical because, well, those rolls are not really world class.
Now, back to the phrase "Guter Mann". I want to briefly explain that the phrase can actually be used without being negative at all, and that is in cases where the adjective "good" isn't out of place, but justified. For example, if I am being asked an opinion about someone:
Coworker: Was hälst du von Markus?
Me: Guter Mann.
Coworker: What do you think about Markus?
Me: Good man.
This would be a very solid compliment. The fact that the evaluation is an unfettered "gut" might even be considered highly positive.
I'd say that in most cases when the word is used with a negative connotation, there is already some tangible tension in the conversation, and I would usually expect this to happen in a conversation between people who are not close. For example, we are at the airport and an annoyed customer is being asked to check in a bag that they consider small enough to be hand luggage:
Steward: Sie müssen diesen Koffer leider am Schalter aufgeben.
Annoyed Customer: Guter Mann, der entspricht doch genau den Abmessungen hier.
Steward: I am afraid you'll have to check in this bag.
Annoyed Customer: Kind sir, if you have a look you'll see that it precisely matches the dimensions given here.
In this case, the customer is clearly annoyed and it is equally clear that "Guter Mann" is used in a derogatory way. However, the less tension there is in the given context, the less strong the irony of the phrase becomes. For example, you mentioned:
Und wie heißt der gute Mann?
This could be an almost neutral statement, possibly slightly ironic, with the "gut" added in there just for comical effect. For example, imagine you are with a friend who suddenly mentions that you will be joined by a third guy and proceeds to explain what a wonderful person that is, how much you will like him, and never mentions his name. Your friend is obviously anxious to make sure that his two buddies will get along. You might then ask the above question, and there'd be nothing particularly negative about the interaction. It's just a little comical that you now know what a fantastic person you are about to meet, but you haven't heard their name yet. You might even be relaxing the situation a bit if you say it with a friendly wink.
To summarize, the more out of place the adjective "gut" in "Guter Mann" seems to be considering the general tone of the conversation, the more likely it is to be irony. As in any case, irony can imply sarcasm.