Multi-stage isolation process for planarization of Josephson junctions