Hey @autumn briar thanks for all that information. I'll try to explain my use case and see if it holds up. This will be our first experience with Mongo transactions so appreciate the cautionary advice
basically we have a data model where there is a top-level document which owns many related documents. those owned documents can be potentially "moved" to have a relationship with a different top level document (can only be owned by one at a time) making the idea of deeply nesting the data in one collection difficult / impossible
however, there is also a requirement that a single API call should be able to update the parent document and its related owned documents in an all-or-nothing write to the database. At the same time, we want to layer on an "audit" system which can store a record of the historical snapshots of those complete documents, as well as a "metadata" record of which documents were changed in each particular operation / API call (basically a list of references to those historical snapshots)
we want those snapshots and that metadata document to be written in the same transaction as the actual changes so that there is a guarantee that the "audit log" of changes is always accurate to the current data stored in the database. For that reason, we stopped considering approaches like piping a change stream from the database to a separate service that could store those "snapshots" after the fact.
The current idea is to use Mongoose "post" hooks to automatically write those snapshot documents within the same transaction any time something changes, without the API business logic having to worry about it each time.
As for the idea of coupling to MongoDB, I think we're pretty far down that road already as our API code heavily relies on Mongoose to perform updates. I had briefly considered switching to something like Prisma but at our current company size and traffic volume it seemed like way too much lift.