Anonymizing a group chat
You are essentially describing instant messaging via onion routing or garlic routing.  Tox is an example of such a protocol. Tor Chat is another.

In an onion network, messages are encapsulated in layers of encryption, analogous to layers of an onion. The encrypted data is transmitted through a series of network nodes called onion routers, each of which &quot;peels&quot; away a single layer, uncovering the data's next destination. When the final layer is decrypted, the message arrives at its destination.

Below is a simple illustrated description of onion routing (taken from Wiki).


In this example onion, the source of the data sends the onion to Router A, which removes a layer of encryption to learn only where to send it next and where it came from (though it does not know if the sender is the origin or just another node). Router A sends it to Router B, which decrypts another layer to learn its next destination. Router B sends it to Router C, which removes the final layer of encryption and transmits the original message to its destination.

This does not completely defeat attacks, but if implemented correctly it should be difficult to de-anonymize users and interpret traffic.  The arrest of silk road creator Ross Ulbricht suggests that with enough desire, time, and luck the FBI could catch you.  But even then, you'd probably need to make some mistakes along the way.  And obviously the FBI are not your average man in the middle.