Here are some basic notes on how I setup my Ender 5 with the above mentioned modifications. This is not a complete guide, just the key information and some relevant links. It might be a good idea to look for guides on YouTube and reading the official documentation.
Pick a recent LTS branch of Marlin.