This may interest some people, it's a brief explanation of how I think outbox should work ideally (criticism and suggestions welcome):
You can't have this local database thing in all contexts like all microapps and whatnot (those can probably just use a naïve NIP-65 approach) but a full-fledged Nostr client should.