  We propose a new principle to realize flatbands which are robust in real
materials, based on a network superstructure of one-dimensional segments. This
mechanism is naturally realized in the nearly commensurate charge-density wave
of 1T-TaS${}_2$ with the honeycomb network of conducting domain walls, and the
resulting flatband can naturally explain the enhanced superconductivity. We
also show that corner states, which are a hallmark of the higher-order
topological insulators, appear in the network superstructure.
