Hi!
you will need to run a docker version with 3.18.7.
Then you will restore mongo db from snap to the same version in a docker environment.
While upgrading, don’t jump majors. Go first to 4.8.4, then to latest 5.0.4
Let me know if this helps.
Thanks!