The thermodynamic structure and large-scale structure filament in MACS J0717.5+3745