Record heatwaves, lack of air conditioning put prisoners’ lives at risk, new documentary says