As part of the "Compare the contents before translating" step (T241589) of the Section Translation workflow, the target contents include a new section placeholder element. This lets the user know where the section will be added to the existing article.
We need to make sure that the algorithm to determine where to publish the section is in sync with (or preferably the same) the one that decides where to show the placeholder. The idea is to add the new section at the end, but with some smart considerations to still leave references and other special sections after it. Since this behavior may be tweaked, we want to make sure that it remains consistent in both places (preview and publish).
More details are available in the parent task: T241589: Section Translation: Compare the contents before translating