See Game theory
In real-world experiments, roughly 70% of people choose to confess, and roughly 30% choose to refuse to confess.
The "rational choice" may not be optimal. If both agreed, then they could do better.
Repeated interaction could allow cooperation
We not only need more than communication, we need enforcement, a Contract... See Law. Also Education. All this helps by changing the payoffs. Video about all this