Nanoscale phase separation and superconductivity in the one dimensional Hirsch model