What number of robbers, under the model of the prisoner's dilemma, would be optimal?

The prisoner's dilemma is defined as

"Two members of a criminal gang are arrested and imprisoned. Each prisoner is in solitary confinement with no means of speaking to or exchanging messages with the other. The police admit they don't have enough evidence to convict the pair on the principal charge. They plan to sentence both to a year in prison on a lesser charge. Simultaneously, the police offer each prisoner a Faustian bargain. Each prisoner is given the opportunity either to betray the other, by testifying that the other committed the crime, or to cooperate with the other by remaining silent. Here's how it goes:

If A and B both betray the other, each of them serves 2 years in prison If A betrays B but B remains silent, A will be set free and B will serve 3 years in prison (and vice versa) If A and B both remain silent, both of them will only serve 1 year in prison (on the lesser charge)"

Would it be possible to extend this model to, say, 5 or 10 different prisoners? And if so, would it be possible to determine what amount of prisoners would be optimal for a crime? As in, least chance of at least one prisoner confessing?

Consider a set of $n$ players, each with utility function $U_{i}(\vec{e}) = a||\vec{e}|| - be_{i}$, for $a, b > 0$ and $e_{i} \in [0, 1]$. The $e_{i}$ terms represent effort. If we consider where $a < \frac{b}{n}$, then individuals have incentive to mooch of the system. So it's analogous to the prisoner's dilemma game, where everyone will turn each other in basically. However, if $a > \frac{b}{n}$, then $e_{i} = 1$, $\forall{i}$ becomes the dominant strategy.