I'm having the exact same issue @Mark Clarkson describes and it is independent from any extensive or memory intensive effect (because I know how much e.g. turbulence would take in average plus it takes as long to render basic animations without effects). Media Encoder gets slower and slower while rendering only 1:30 min. comps without any apparent reason. Even rendering basic PNG or JPG sequences takes over an hour for only one minute. To make matters worse After Effects freezes when closed. I just won't quit.
I think it started since I updated to version 22. Seeing that it has gotten slow I downgraded back to 18.4.1, the "condition" has persisted. Maybe updating ME only might be worth a try. The previews take long too. Its running on an i7 with 32 GB RAM, separate SSD for the media cache and preview files and a GPU with 6GB by a well known major manufacturer, that has not failed my needs in any occasion (not even playing Doom Eternal with the highest settings). Grmp.
Error or problem
Freeze or hang
You mention the same issue as Mark Clarkson, have you followed the steps to disable MFR in both AE and AME?
Have you tried different video formats, such as ProRes va MP4 and whether image sequences take less time? I'm trying to suggest it might be worth working out if it's a GPU issue, format export issue or a particular effect which is causing this.
For what it's worth, I'm on an i7 with 32Gb RAM and a 2Gb GPU (that does not perform all that well). When I disabled MFR, it was business as usual.