Your assumption is that the entire NY judicial system isn’t rigged.Every state has a judicial review process for dealing with rogue judges. New York has a Judicial Commission to deal with Judicial Misconduct. As I read information about New York, other than for felony convictions, actual removal in New York per the state's constitution, requires the state legislature to do so, which could be recommended or referred to it by the Commission. Nonetheless I would expect such gross disregard to be immediately overturned and if necessary, a request to go to Federal Court, or a Petition for Writ of Cert to SCOTUS for violating the 8th Amendment.
An Appellate Judge Merits Panel of several judges pulling such a stunt would result in enormous legal backlash on the judges involved. The optics of it would be horrific for them.