Fra og med mongoengine v0.9 (som i øjeblikket er under udvikling), vil du være i stand til at bruge aggregate() , som du foreslog:https://docs.mongoengine.org/ apireference.html#mongoengine.queryset.QuerySet.aggregate
Indtil da skal du stole på pymongo :Flask-MongoEngine &PyMongo Aggregation Query