VERNAZZA, Italy — The teenagers panted heavily as they climbed up the steep slope in the early morning, the Mediterranean sun glittering on the sea far below. Along the way, they stopped to survey the stone walls bordering the winding roads, carefully taking measurements.

“When you rebuild a wall, you dig among the rubble until you find the original corner stones, and start from there,” their guide, Margherita Ermirio, instructed them. “No cranes, no cement, right?” she teased them, as they laughed.

After several years abroad, Ms. Ermirio, 32, has returned to her hometown, Vernazza, one of five villages that make up Cinque Terre, the stunning, vertical, gravity-defying cluster of homes that cling to the cliffs of Italy’s northwestern coast.

She has since become the pillar of a local battle to restore and preserve an old and essential but dying art in much of Italy: terracing.