If/when the new 64-bit payment IDs start seeing use, this won't work any more.

Ideally, you would only want to reveal the stealth addressing for the recipient, not necessarily the rest of a tx's outputs. Luckily, one is as easy as the other.

Unfortunately, it's currently only possible for the recipient, not the sender, as the tx private key (r) is not stored anywhere after a transaction is sent.

A recipient can presently easily reveal that he owns outputs, without compromising his viewkey, by revealing his ECDH key derivation for the transaction that has outputs he wants to prove ownership of. I have code (or could quickly adapt code) that can do this.

A spender would need to start storing r, or deterministically generating it, so it could be reconstructed on demand. He could presently prove a transaction was created by him, but not who it was sent to, so it's not that useful in your scenario.