There is no need to sync the joplin directory locally which could well alleviate the problem. Just turn off the local sync for it in the NextCloud client.
Yes, you might be right. The issue with that is that the local file sync using the nextcloud client is significantly faster than the webdav based on with the desktop app.
Or do I misunderstand your suggestion?
I have to admit I misread your post, I saw webdav sync but didn't realise it was just for phone and you were using a different sync target for desktop.
To be honest I haven't heard of anything intentionally mixing the sync targets before like that so it might be that it causes some issues.
Unfortunately NextCloud's webDAV implementation is horrifically slow as you have found out.
Yes, It's not only slow, but also syncs a couple of hundred files often, when only a few have been changed.
Still: In my understanding the timestamps should prevent any file conflicts or even contribute in resolving those.
It shouldn't be syncing that many, if you change a single file with no resources then I think it is common to see two items being sync'd.
I know that there is something weird about the NextCloud webDAV implementation which is why there is a separate NextCloud sync target, something about it not handling locks correctly... I'm still wondering if the cause of the issue is simply that mismatch doing something weird.
It certainly looks like the Desktop app with the file-sync is behaving that way. The number of edited notes corresponds closely with the number of synced items.
However: using the webdav protocol, the result is different. After making a single change in a single note and synching it back, webdav fetches usually about 50-120 elements, but reports a single change then.
This has improved over time with newer versions on android. The initial setup had about 700-900 elements to fetch each time, independent of the number of changes. So synching via webdav was not that fun then.