A VERDANT suburb in the northern state of Schleswig-Holstein, Pinneberg epitomises the Germany of record consumer confidence, booming exports and a bulging federal budget surplus. Here commuters stream off trains from Hamburg (local unemployment is 4.9%), climb into big cars and zip home to neat houses with solar panels on the roof.

But visit the Theodor Heuss secondary school and you see another Germany. Duct tape attaches wallboard partitions to bare concrete ceilings studded with loose wires. Pipes, weeds and bits of tile stick out of the ground. Noisy emergency roof repairs had to be carried out during exams. “We went to the state government three years ago but nothing has happened,” complains Ulrike Graefen of the Pinneberg School Alliance, a parents’ group.

This is the underside of Germany’s economic miracle: a country with a budget surplus of €23.7bn ($26.7bn), or 0.8% of GDP, has the lowest infrastructure investment rate of any big, rich economy. The IMF complains that such under-spending contributes to the country’s excessive savings, helping to unbalance global trade. And it hurts Germany, too.

In the 1990s Germany invested massively to incorporate the formerly communist East. Then came two shocks, both to do with rules. In 2001, with the economy ailing, the government broke the new euro zone’s deficit limits and had to cut spending. Ten years later, as the euro crisis again drove deficits up, Berlin imposed a “debt brake” on federal and state governments. Politicians found it easier to cut long-term outlays than current spending. The net value of state assets fell between 2002-07, and again since 2012 (see chart).

Schleswig-Holstein is typical. An urgent expansion of the coastal motorway is delayed. The railway across the Danish border had to be closed in April because of a rotting bridge. At the eastern entrance to the Kiel Canal (the world’s busiest artificial waterway, connecting the Baltic and North seas), only one of the four Wilhelmine locks is in operation, leaving freighters queuing to get through. Last year broken lock gates closed it down altogether, forcing ships to take the 450km (280-mile) route around Denmark. Comprehensive repairs will begin in 2025. Such tales of leaky classrooms and potholed roads, as well as patchy internet, are the flip side of today’s wealthy, booming Germany. In the World Economic Forum’s global competitiveness survey in 2010-11, Germany ranked fifth in the world for both road and railway quality, and 12th for internet bandwidth. The latest survey ranks it 16th, 11th and 29th respectively. Marcel Fratzscher of the German Institute for Economic Research believes that low public investment weighs on the (also low) private investment rate. Business lobbies, like the Northern Business Union in Schleswig-Holstein, clamour for something to be done. The government is increasing infrastructure spending to €14bn in 2017, up 10% on last year. But local governments reckon they need over €135bn just to handle the current backlog. In the campaign for the national election in September, politicians will clash over whether to invest the federal budget surplus or to return it in tax cuts. The liberal Free Democratic Party and many in Angela Merkel’s Christian Democrats prefer the latter. But Sebastian Dullien, an economist at Berlin’s University of Applied Sciences, argues that past tax relief has not fuelled higher investment; rather it mostly sits in bank accounts. The Social Democrats and Greens share that analysis. Mrs Merkel, in contrast to others in her party, seems to prefer a mix of tax cuts and investment.

Mr Fratzscher points to a longer-term solution: requiring Berlin to invest at least as much in state assets as the value by which they are depreciating, and to put aside funds in good economic times to ensure a smooth flow of investment in bad ones. If Germany’s obedience to rules got it into its low-investment funk, perhaps new rules can get it out.