The derailment of a freight train on a key section of railway in South Australia is affecting all transcontinental train services as heatwave conditions in the area impact the pace of recovery works.