I do not use web clipper at all nor do I use any cloud sync. All my data resides on my own NAS (Synology) on my local network. Note history is set to one (1) day and while I may add a few notes daily, I rarely delete any and rarely change any. I do keep a half-dozen devices synced to the NAS data whenever I get around to it but these are used simply as backups and don't ever make any changes to existing notes.
Of the 2400 or so (I just added them up) about 2300 of the notes have two images each with the occasional one having three. The balance of the notes are text only.
So I don't know where these 40,000 resources came from. I have just done an "Export All" and tomorrow plan to wipe everything and reload, something I haven't done for a few months. Hopefully that will get rid of a few "resources."