Can I and several thousand of my closest, most-likely-to-be-arrested
friends contract with each other and agree to insist that any criminal
case against us go to trial, in exchange for everyone else in the bloc
promising to do the same?
It is probably not illegal to do this, but the agreement is probably not enforceable in a court of law.
As context, in early union-management law cases before there were state and federal laws on the topic, it wasn't uncommon for a court to find that a strike was anti-competitive illegal conduct, or constituted tortious interference with the employer's contracts, or was otherwise legally actionable. Modern labor laws now protect employees engaging in collective action from civil or criminal liability for doing so.
I think it is unlikely that someone trying to do this would face criminal or civil liability, such as a successful prosecution for conspiracy to obstruct justice, for making these promises and carrying them out without any enforceable legal compulsion to do so, and when no duress (like threats of violence towards people who breach this agreement) is involved. But, admittedly, there is very little precedent for this one way or the other, and state laws that could be relevant to this question can vary.
Is the right(?) to not go to trial in a criminal case something that a
contract can legitimately require you to waive?
No. The contract would probably be found to be void as contrary to public policy (see below).
If someone tried to not follow the contract and didn't actually do the
required procedural thing in court, would the criminal court system
recognize the contract and require a trial anyway?
No. In all likelihood the court would not enforce the contract.
Would a person's lawyer be required by lawyer ethics rules to not have
their client violate the contract?
No. The greater ethical problem for the lawyer would be honoring the contract in the face of a favorable plea deal for the client unless stringent ethical precautions are met.
There are specific ethical rules for lawyers in criminal cases that limit the circumstances in which it is permissible for clients to take a position jointly. See, e.g., Colorado Rule of Professional Conduct 1.8(g) which states:
(g) A lawyer who represents two or more clients shall not
participate in making an aggregate settlement of the claims of or
against the clients, or in a criminal case an aggregated agreement
as to guilty or nolo contendere pleas, unless each client gives
informed consent, in a writing signed by the client. The lawyer's
disclosure shall include the existence and nature of all the claims or
pleas involved and of the participation of each person in the
settlement.
(Most U.S. jurisdictions have a substantially identical rule with the same rule number but not necessarily the same subsection number.)
This doesn't outright bar such an agreement as a matter of professional ethics for lawyers, but does disfavor them by requiring a very high level of disclosure to a client and doesn't contemplate a court enforcement mechanism, instead it relies upon the attorneys' conduct on behalf of multiple clients all represented in related cases by the same lawyer.
This rule also doesn't absolutely unambiguously apply to a plea of not guilty as opposed to a plea of guilty, although there is a fair reading of the rule that extends it to pleas of not guilty. The official comment to that rule (from the ABA drafters of the model rule) states:
Differences in willingness to make or accept an offer of settlement
are among the risks of common representation of multiple clients by a
single lawyer. Under Rule 1.7, this is one of the risks that should be
discussed before undertaking the representation, as part of the
process of obtaining the clients' informed consent. In addition,
Rule 1.2(a) protects each client's right to have the final say in deciding whether to accept or reject an offer of settlement and in
deciding whether to enter a guilty or nolo contendere plea in a
criminal case. The rule stated in this paragraph is a corollary of
both these Rules and provides that, before any settlement offer or
plea bargain is made or accepted on behalf of multiple clients, the
lawyer must inform each of them about all the material terms of the
settlement, including what the other clients will receive or pay if
the settlement or plea offer is accepted. See also Rule 1.0(e)
(definition of informed consent). Lawyers representing a class of
plaintiffs or defendants, or those proceeding derivatively, may not
have a full client-lawyer relationship with each member of the class;
nevertheless, such lawyers must comply with applicable rules
regulating notification of class members and other procedural
requirements designed to ensure adequate protection of the entire
class.
The pertinent part of Rule of Professional Conduct 1.2(a) states:
In a criminal case, the lawyer shall abide by the client's decision,
after consultation with the lawyer, as to a plea to be entered,
whether to waive jury trial and whether the client will testify.
These again, hint at the notion that it is unethical to rely on anything other than a client's decision on the question of whether to reject to plea bargain, although there is little to no case law or commentary precisely on point.
Or would the other members of the bloc be stuck trying to collect
breach of contract damages?
There are contracts which can be specifically performed or enforced with injunctive relief.
But this contract would probably be found to be void as contrary to public policy, and thus couldn't be enforced at all. A court is not going to order someone to refuse a plea bargain offer because they entered a contract with someone unrelated to the case promising to go to trial. The exact justification for this likely result is a bit trickier to pin down.
Honestly, I've never seen this fact pattern present itself in real life, so I've never seen a case squarely on point.
But one good starting point for the analysis is that lawyers aren't allowed to enter into settlement agreements that prohibit reporting criminal conduct, or that prohibit the lawyer from representing other clients against the same defendant as the lawyer faces with a current client in future cases. Many states also prohibit lawyers from threatening to bring criminal charges to gain advantage in a civil case.
All of these rules reflect the general principle that it is usually improper for a contract to bind how people participate in the criminal justice system, which should be independent of other considerations as a matter of public policy. This general principle would be very likely to be invoked in this situation.
There have been a handful of instances of the criminal defense bar engaging in collective action and refusing to plead guilty even in the face of favorable plea deals, usually in response to some sort of outrageous conduct by the local DA.
Another not uncommon provocation for this kind of action, analogous to union activity, is when pay for public defenders is absurdly low to the point of being untenable or when the case loads of public defenders are unmanageably high, vis-a-vis public prosecutors. In those circumstances, criminal defense lawyers gum up the system to a point where it can't even begin to function since continuing the status quo is untenable for them.
But legally binding contracts have never been the means by which this collective action was sustained in any of these case. Instead, these have been instances of a shared sense of moral obligation and common cause by the defense bar that clients were convinced to participate in themselves.
These incidents have been comparable to members of a union that is not striking, or members of the general public, refusing to cross the picket line of strikers at a business when the business's regular employees are on strike and the business is being operated by managers or "scabs" (i.e. non-union replacement workers).