The sent/received debug logs often contain confusing direction tags.
For s2s, I've seen this in the wild:
Nov 05 08:49:50 s2sout559cebce6220 debug Received[s2sout]: <presence type='error' email@example.com/redacted' xml:lang='en' from='redacted@redacted/redacted'>
Here it looks like traffic is coming through the wrong s2s handle (out instead of in), but maybe the connection is actually bi-di? Then that should be reflected in the tag. The other side is an ejabberd version 18.06.115.
For c2s, there are issues where the logger is connected to the wrong session after an 0198 resume, leading to a mismatch between incoming and outgoing sessions and what's reported by `c2s:show()`:
Nov 07 14:17:55 c2s559ce9ae8940 debug Sending[c2s_unbound]: <iq id='fnord' type='get' firstname.lastname@example.org/yaxim.x' from='some@muc/Ge0rG'>
Nov 07 14:17:56 c2s559d3c36a0b0 debug Received[c2s]: <iq id='fnord' type='result' to='some@muc/Ge0rG' email@example.com/yaxim.x'>
c2s:show() tells me:
| firstname.lastname@example.org/yaxim.x [c2s559d3c36a0b0] dnd(0) (encrypted) (sm)