I think your best bet is to use bulkWrite and give it the array of updates you are making on the collection.
I have linked the docs for this below.
You would create an array of all the updates you want done to the collection. Each item of the bulkWrite array can perform insert, update, delete and replace operations.
It would be up to you to determine which action is appropriate and how to update the record.