Behind the scenes, the chief justice molded three momentous Jan. 6 and election cases that helped determine the former president’s fate.