I've checked and it is nothing to do with the server.
To take it one step further, I set up a new sync folder for Joplin and it now works correctly, as it did before.
It is something to do with a conflict created when I synched my ipad with the same folder on next cloud.
As far as I can tell it duplicated lots of the items.
Re doing the steps (with the same settings except targeting to the new folder) seems to have solved the problem.
With thanks.