If you want an immediate rollback then two methods come to mind both of which uses pg_upgrade:
Use the “–copy” switch which creates the upgraded cluster by copying the original cluster. The disadvantage of course is downtime since the upgrade requires it be the only process accessing the cluster.
Use the hardlinks option to upgrade i.e. “–link”. In the case of a rollback you would simply promote the replica which still hasn’t been upgraded. You can then rebuild your failed primary using pg_rewind.