I have a very similar problem as in the topic below.
Copy Specific document in same collection
So I will simply clone the docs in the same collection, will remove _id field and update some other fields. I don’t want to bring data to the server and insert afterwards.
How to prevent Halloween problem described here https://www.mongodb.com/docs/manual/reference/operator/aggregation/merge/#output-to-the-same-collection-that-is-being-aggregated by following @steevej approach.
Is it a good approach to set unique indexes and expect potential fails after re-read and re-insert cases using whenMatched: “keepExisting”