I would suggest not using kind4 for invites, it should be a new kind that clients can handle separately instead of detecting it in a DM
its basically like NIP 28, but with a shared secret that is given to all participants using direct messages. here is an overview: https://github.com/vishalxl/nips/blob/master/38.md
Discussion
yes, ideally should have some other kind for such private messages related to apps, that others can also use. will keep that in mind long term...