Proof of private keys ownership for multiple addresses
Why would you prove ownership of inputs/outputs in two-party coinjoin? This data upon publishing would make the coinjoin efforts obsolete and would totally cancel all anonymity set in this specific transaction.
For input you could use some specific wallet setup where inputs would be in separate xpub derivation path, and outputs in separate.
Even with point 2. you'd have to post the outputs as the list of addresses if you don't want to leak pubkeys?

This looks to me like an XY problem and your requirements are contradicting themselves. Could you explain what you're trying to achieve?