RE: Export/Import from system documentation tables
Thanks André: I was hoping to progress my efforts and post further results myself, but as ever, your guidance is appreciated. Having changed the staging table as you suggest, it looks like I've still missed something. I have an export project containing (1) the custom data entity for the security rules and (2) the WHSWarehouseLocationDirectiveV2Entity. When I export the data package, the WHSWarehouseLocationDirectiveV2Entity spreadsheet shows a DirectiveQueryFileName column with a GUID pointing to a file that is vaguely readable in a text editor of choice: there are a bunch of control characters, and I certainly wouldn't fancy trying to create queries from scratch in this format.

Nonetheless, it's better than my custom entity, because that still shows the encoded value directly in the spreadsheet. I can't spot any obvious differences in the properties of either the field (both custom entity & Warehouse entity have it as a Container field, for example), the data entity (Entity category property, Subscriber access level are the same), or the staging table field (I've set the Asset Classification to Customer Content, though it isn't apparent to me why that would be relevant). Looking at the WHSWarehouseLocationDirectiveV2Entity, I can see there are a couple of methods that work with the query field, but they look like they're only relevant to inserts, so don't see anything there to disagree with your statement "no additional coding required" That said, it seems obvious that I have to change something in how the field's handled: any further suggestions would be welcome.
As an aside, querying the views & the staging tables directly in SQL Studio Management Studio, they both look pretty similar (i.e. the views both have the query columns starting 0x07FD, and the staging tables both omit the leading 0x). There's another thread discussing virtual fields for containers which is what I planned to investigate, but I'd have thought that would require the field handling differently for import & export, which doesn't feel feasible.