Oceanic flights are planned so that at every point along the route, the aircraft can lose an engine or cabin pressure and still reach a pre-approved diversion airport with enough fuel, with the flight plan marking the points where turning back versus continuing becomes the faster option. If a diversion is needed mid-ocean, the crew offsets from their assigned track and altitude to stay clear of other traffic, then heads to the nearest suitable airport, such as Gander, Keflavik or Shannon over the Atlantic, or Anchorage, Cold Bay or Midway over the Pacific.
Alternate airports are picked based with regards to all kinds of contingencies (many of them meteorological), but "the US closes literally every airport" is not one of them.