Nextcloud server is written in PHP. Of course it is slow. It's also designed to be used as an office productivity suite meaning a lot of features you may not actually use are enabled by default and those services come with their own cronjobs and so on.
At the risk of sounding out the obvious. PHP is limited to single threaded processes and has garbage collection. It's certainly not the fastest language one could use for handling multiple concurrent jobs.
On the other hand, in 99.99% of web applications you do not need self baked concurrency. Instead use a queue system which handles this. I've used this with 20 million background jobs per day without hassles, it scales very well horizontally und vertically.