Nanoscale phase engineering of thermal transport with a Josephson heat modulator