Endnotes content shuffled by ICML import
InDesign/InCopy versions 14, 15, & 16
The position of user-entered "extra" content in an endnote story is currently lost when endnotes are replaced during an update of the associated story.
Adobe's help documentation says (from the "Work with endnote text" section of https://helpx.adobe.com/indesign/using/endnotes.html )
"Endnotes in the endnote frame are indicated with Endnote Markers. Text, such as heading, can be typed in the endnote frame outside these markers. This extra content does not belong to any endnote."
This suggests that user content in an endnotes story is allowed and supported.
However, extra content moves around during an update. An attached screenshot (1_shuffled.png) shows a "before" (left side) with user-entered chapter headers in the endnotes separating each story's endnotes and an "after" (right side) which shows the same endnotes after editing Story 2 in InCopy and then updating its link. The update's ICML import has moved all of Story 2's endnotes ahead of the "Chapter 2" header.
Another screenshot (2_between.png) shows how user content that was between endnote entries is repositioned in front of the endnote entries after an update. It looks as though the ICML import removed all of story A's old endnotes and then added in the new endnotes en masse, and lost the old positions in the process.
A third screenshot (3_between2.png) shows that the same reshuffling happens to user content that's in its own paragraphs and completely between endnotes.
And lastly, an attached screenshot (4_mangled.png) shows how updating a story (Story B) that was edited with InCopy can completely mangle the existing endnotes structure. The ICML import has moved Story B's endnotes to be right after Story A's, has put the Story B header after the new endnote entries, and has orphaned user content that was previously between the endnotes.
An ICML import should retain the position of each endnote entry rather than removing all the old entries and then adding all of the imported entries at an arbitrary position.