Great guide, I ran into a small problem with changing MongoDB versions, and here's my notes...
When upgrading to the latest version (currently 5.9.29) you may require an upgrade of MongoDB from 3.4 -> 3.6. Before starting the upgrade make sure to set the compatibility version in the database to 3.4 (see:
https://docs.mongodb.com/manual/release-notes/3.6-upgrade-standalone/).
Also, make sure to connect to the UniFi mongoDB (e.g. mongo --port 27117), just in case there is also a default mongo instance running.