I would recommend using a Pi 5 for running MongoDB in an embedded environment. Deeper discussion and explanation here.