We should check, if we can improve the performance of modifications to large groups by using the sortvals parameter on uniqueMember and memberUid. The comment https://bugs.openldap.org/show_bug.cgi?id=9349#c6 recommends this.
sortvals <attr> [...]
Specify a list of multi-valued attributes whose values will always be maintained in sorted order. Using this option will allow Modify, Compare, and filter
evaluations on these attributes to be performed more efficiently. The resulting sort order depends on the attributes' syntax and matching rules and may not
correspond to lexical order or any other recognizable order.