I love this[1] website which illustrates some of the nuances of the prisoners dilemma in a quite frankly great way. In fact I've deleted the rest of my post as I believe the website does a much better job of explaining how the correct answer to the prisoners dilemma changes depending on how the population behaves and how often they make mistakes.
[1] https://ncase.me/trust/