I’d probably recommend using rawCollection() and the official npm MongoDB library aggregate method. So in a Meteor method, for example:
Meteor.methods({
async aggregateMyStuff() {
const pipeline = [ ... ];
const options = { ... };
return MyCollection.rawCollection().aggregate(pipeline, options);
},
});