Ok, so resource utilization is looking pretty low. Suggests that you might be dealing either with a network limit or a queuing issue. A queuing issue might be caused by something like insufficient “max_children” in php.
However, I’m also now thinking about your “remote” network connection. So you have your nextcloud server running somewhere with symmetric 400 Mbps. But what about the where you are accessing it from while you are doing your upload test? Are you running a “big upload” from one client-side network and running your UI performance test from the same network? Or are you running from two separate client-side networks?
Here’s what I’m getting at; if you are doing both the upload and UI performance test from the same network, then the upload is probably saturating your upstream network, which is what is causing you poor performance. Not your server. A lot of cheap home routers do a terrible job of allocating bandwidth to short requests.
Look into bufferbloat; https://www.bufferbloat.net/projects/bloat/wiki/What_can_I_do_about_Bufferbloat/