I believe it is correct to assume that τὴν ἔχθραν (the enmity) belongs with καταργήσας (abolished), with ἐν τῇ σαρκὶ αὐτοῦ (in His flesh) describing how the enmity was abolished. ἐν τῇ σαρκὶ αὐτοῦ does not refer, I think, to enmity that is somehow in His flesh; His flesh is the means by which enmity is abolished. λύσας belongs with τὸ μεσότοιχον τοῦ φραγμοῦ (ESV: dividing wall, YLT: the middle wall of the enclosure)
Another very literal translation, The Orthodox New Testament, suggests:
14 For He is our peace,
αὐτὸς γάρ ἐστιν ἡ εἰρήνη ἡμῶν,
the [One] Who made the both one,
αὐτὸς γάρ ἐστιν ἡ εἰρήνη ἡμῶν,
and broke down the middle wall of the hedge,
καὶ τὸ μεσότοιχον τοῦ φραγμοῦ λύσας,
15having abolished by ordinances the enmity
τὴν ἔχθραν (a) ... ἐν δόγμασι καταργήσας, (d)
-the law of the commandments-
... τὸν νόμον τῶν ἐντολῶν (c) ...
in His flesh ...
... ἐν τῇ σαρκὶ (b) ...
where the phrase [τὴν ἔχθραν,]a [ἐν τῇ σαρκὶ]b [αὐτοῦ τὸν νόμον τῶν ἐντολῶν]c [ἐν δόγμασι καταργήσας,]d has been "unscrambled" as shown above.
The Orthodox New Testament is attempting to follow the sense of the passage as it is punctuated in the Patriarchal Text (used by Greek Orthodox):
... τὴν ἔχθραν, ἐν τῇ σαρκὶ αὐτοῦ τὸν νόμον τῶν ἐντολῶν ἐν δόγμασι καταργήσας,
The ESV supposedly follows the punctuation imputed by the Nestle-Aland Critical Text:
... τὴν ἔχθραν ἐν τῇ σαρκὶ αὐτοῦ, τὸν νόμον τῶν ἐντολῶν ἐν δόγμασι, καταργήσας·
The YLT is, I understand, based on the Textus Receptus and the Majority Text. The Textus Receptus1 punctuation agrees with that found in the Patriarchal Text, but the Majority Text2 reads:
...τὴν ἔχθραν, ἐν τῇ σαρκὶ αὐτοῦ, τὸν νόμον τῶν ἐντολῶν ἐν δόγμασι καταργήσας.
I think the Critical Text punctuation leads to an understanding something like, "... having abolished in His flesh the enmity, [that is] the commandments (as expressed in ordinances)." The ESV translators chose to associate "enmity" with the μεσότοιχον τοῦ φραγμοῦ in verse 14, which they simply render as "dividing wall", but I don't see how it literally belongs there.
I think the Majority Text punctuation leads to an understanding similar to that found in the Patriarchal Text: "... having abolished, in His flesh, the enmity, [that is] the commandments (as expressed in ordnances)." The YLT translation gives the impression, though, that "His flesh" was not what broke down the enmity, etc., but rather that He broke down the enmity that was in His flesh. Neither the Textus Receptus nor the Majority Text punctuation seem to support this, so it is curious how they arrived at this particular translation.
Punctuation is a modern device. It was not in the ancient manuscripts, but interpreters in antiquity did understand where pauses should be and how phrases related to each other. Greek commentaries on this passage from antiquity seem to support the way the passage is rendered in The Orthodox New Testament. Theophylact, for example, treats the phrase καὶ τὸ μεσότοιχον τοῦ φραγμοῦ λύσας, τὴν ἔχθραν, ἐν τῇ σαρκὶ αὐτοῦ ... καταργήσας separately from τὸν νόμον τῶν ἐντολῶν ἐν δόγμασι. He also understood ἐν τῇ σαρκὶ αὐτοῦ to refer to His flesh as the agent by which enmity was removed. Chrysostom, upon whose commentaries Theophylact's were largely based, does likewise. Regarding the first phrase, Theophylact writes:
And hath broken down the middle wall of partition between us, having abolished in His flesh the enmity.
Here the apostle explains what is meant by the middle wall of partition [τὸ μεσότοιχον τοῦ φραγμοῦ]: it is the enmity [τὴν ἔχθραν] towards God, begotten of our sins, of both the Gentiles and the Jews; as the prophet Isaiah declares, Your iniquities separate between you and God.3 This middle wall [τὸ μεσότοιχον] of sins and enmity, Christ has abolished in His own flesh. How did He accomplish this? By putting a stop to the enmity ... The law was a wall of partition [φραγμός], given to us men for our security, surrounding us and protecting us from sin. But when we transgressed the law, and were no longer guarded by it, the middle wall [μεσότοιχον] was revealed to be sin. It ceased to keep men safe, and instead separated from God.4
1. Textus Receptus according to 1881 Scrivener edition.
2. Farstad et. al., The Majority Text Greek New Testament Interlinear (Thomas Nelson, 2007)
3. Isaiah 59:2 LXX
4. Explanation of the Epistle to the Ephesians (tr. from Greek; Chrysostom Press, 2013), pp.38-39