Hey there, first of all, don't panic!
It's hard to know what went wrong in situations like this, more so when the user is distressed.
Secondly, if I were you, in any moment of a doubt, I'd make some sort of backup from last correctly synced device.
Got data in Dropbox? copy that
Any data on old devices? disable sync and make a .jex backup
If there's android phone with root, attempt to save the database and data (more on that topic).
Once you made a backup, it should be a matter of its correct import. For example, if it's cloud Dropbox data, you may load it to other cloud, sync it to a device with clean Joplin profile.
There's other good response about fairly similar problem: