Import Folders and Attachments from Notes

On the way to adopting Devonthink, I exported a couple of thousand notes from Evernote to Apple Notes. Big mistake. After several attempts, I deleted them all and Apple Notes appears to work fine. Notes sync properly and I can only see the few current notes I have on any device or on icloud.com.
When I go into Devonthink and do File>Import folders and attachments from Notes it imports literally thousands of notes and attachments, including the Evernote ones I imported then deleted. I left it alone for a few months in case there was some sort of delayed syncing issue, but exactly the same thing happens.

Does Devonthink do some sort of “hidden access” to Apple Notes so it sees completely different content to what Apple’s own apps show? How do I solve this? I can’t delete what I can’t see. I have workarounds using simplenote and nvalt but I quite like the look of notes on ios11/High Sierra and would like to be able to use them.

Notes’ AppleScript/export features are very limited, therefore DEVONthink simply imports all attachments found in Notes’ container.

Why Apple is caching/storing deleted attachments for a long time (or even forever?) on their servers is a question that only Apple can answer because deleting the notes or even the local container doesn’t fix this, Notes will download the deleted attachments again from Apple’s servers.