If you're having issues with NextCloud being slow and having errors, it's probably because the machine you are running it on is low on RAM and/or CPU.
I bring this up because what ever replacements you try would likely have the same issues.
My NextCloud instance was nearly unusable when I had it on a Raspberry PI 3, but when I moved it to a container on my faster machine (AMD Ryzen 7 4800U with 16GB of ram) it now works flawlessly.