Thucydides, I.32.1 "Δίκαιον, ὦ Ἀθηναῖο . . . ." hard sentence

The Corcyraeans, their city isolated in a war with Corinth, have sent emissaries to Athens to ask for an alliance. Because the Corcyraeans have traditionally been isolationist, their mission is in some embarrassment as they seek help, for they cannot show that they are owed this help. The Corcyraean envoy faces this difficulty forthrightly, as he addresses the Athenians.

‘Δίκαιον, ὦ Ἀθηναῖοι, τοὺς μήτε εὐεργεσίας μεγάλης μήτε ξυμμαχίας προυφειλομένης ἥκοντας παρὰ τοὺς πέλας ἐπικουρίας, ὥσπερ καὶ ἡμεῖς νῦν, δεησομένους ἀναδιδάξαι πρῶτον, μάλιστα μὲν ὡς καὶ ξύμφορα δέονται, εἰ δὲ μή, ὅτι γε οὐκ ἐπιζήμια, ἔπειτα δὲ ὡς καὶ τὴν χάριν βέβαιον ἕξουσιν: εἰ δὲ τούτων μηδὲν σαφὲς καταστήσουσι, μὴ ὀργίζεσθαι ἢν ἀτυχῶσιν.

Proposed translation: It is proper, men of Athens, that those coming to seek help, who cannot prove that they are owed the help by their past deeds or by an alliance treaty, should show first, how what they ask for promises a happy outcome, or at least will not be hurtful; and next, that they will have constant gratitude. If they cannot demonstrate these things, then they should not be angry if their request fails.

Commentary on the parts I had trouble with:

Δίκαιον: “[It is] just/proper”. This is an adjective with the verb to-be implied. In this sentence, it will have an infinitive complement.

τοὺς . . . ἥκοντας: "the ones coming. This denotes the speaker and his fellow emissaries. They are coming to ask Athens for help in a war.

μήτε εὐεργεσίας μεγάλης μήτε ξυμμαχίας προυφειλομένης: Genitive absolute [?], meaning “neither by [earlier] great deeds nor by an actual alliance justified [in their request for an alliance].”

παρὰ τοὺς πέλας: “before neighbors”, i.e. before the Athenians, who are the audience for this oration. Literally, “before the ones-nearby” ??

ὥσπερ καὶ ἡμεῖς νῦν: “just as we [are] now” [in seeking the aid of Athens]

δεησομένους: participle, accusative plural subject of infinitive ἀναδιδάξαι, agrees with τοὺς . . . ἥκοντας, “asking”.

ἀναδιδάξαι πρῶτον: “to show first”

μάλιστα: I left this untranslated, maybe “as well as possible”???

μὲν ὡς καὶ ξύμφορα δέονται: [???] “that they ask for something-expedient, or something-promising-a-favorable-outcome.” I cannot properly explain the grammar of this clause.

You have this mostly right. A few suggestions:

τοὺς μήτε εὐεργεσίας μεγάλης μήτε ξυμμαχίας προυφειλομένης – yes, genitive absolute, “when neither a great favor nor an alliance is owed already/in advance [προ-]”

δεησομένους – note future participle, indicating purpose: 'coming to their neighbors [a stretch for the Corcyreans] for the purpose of asking for help [ἐπικουρίας], as we do now"

μάλιστα – “most of all”

ὡς καὶ ξύμφορα δέονται, – “to show first that they’re asking for advantageous/expedient things”. This is just an indirect statement introduced by ὡς, depending on ἀναδιδάξαι, but you translated it correctly, The following ὅτι γε οὐκ ἐπιζήμια [δέονται] and ὡς καὶ τὴν χάριν βέβαιον ἕξουσιν are parallel – also indirect statements depending on ἀναδιδάξαι.

ξύμφορος is a favorite word of Thucydides, sometimes (but not here) contrasted with δικαιος.

τὴν χάριν βέβαιον – firm/solid gratitude

εἰ δὲ τούτων μηδὲν σαφὲς καταστήσουσι – “if they don’t clearly establish any of these things”

Note that μὴ ὀργίζεσθαι ἢν ἀτυχῶσιν is an additional grammatical complement of δίκαιον.

There’s very little to add to this. On πρῶτον μάλιστα μὲν ὡς καὶ ξύμφορα δέονται, εἰ δὲ μή ὅτι γ’ οὐκ ἐπιζήμια, ἔπειτα δ’ ὡς καὶ τὴν χάριν βέβαιον ἕξουσιν, it might be worth noting how meticulously it’s constructed.
ἔπειτα δὲ ὡς … would precisely balance πρῶτον μὲν ὡς …, but the first limb (πρῶτον …) is made a little more complex, subdivided into μάλιστα μὲν …, εἰ δὲ μή, ….
Ideally (μάλιστα μέν, the best-case scenario), the request will actually (καὶ) be advantageous (to the Athenians’ benefit); failing that (εἰ δὲ μή), it won’t at any rate (γε) be to their detriment.

The familiar Thucydidean distinction between δίκαιον and ξύμφορον is operative throughout the passage, even if the two are not directly opposed. The Corcyreans make it the basis of their appeal.

Many thanks to Hylander and mwh for their comments. I will go through their commentaries line by line to study the issues they raise for me. Thanks again!