Mapping metals at high redshift with far-infrared lines