The API for using create_next_container_version with ChildrenEntitiesAction.REMOVE to remove entities from a container is not great. It essentially removes entities "by value", which means that if there are two identical units in a subsection, removing one will unexpectedly remove both. It needs all lot of tests cases to handle the various combinations of duplicate entries, and pinned vs. unpinned, and we don't even use "pinning" in Open edX yet.
A "remove at index N" API would be much better, although we don't technically need it as the "REPLACE all children with this new list" API (default behavior of create_next_container_version) can do that pretty easily.