The AfD victory in a state election is forcing a rethink of the country’s postwar strategy to safeguard democracy.