I’m curious why use aggregation pipeline rather than using $expr in find? (New since 3.6 but that was quite a while ago)
Your query is then just
db.collection.find({
purchasedEvents: { $in:purchasedEvents },
$expr:{$gt:[ {$size: {$setIntersection: [‘$purchasedEvents’, purchasedEvents]}}, 2] }
})
