Place grated pickles in a small pot. Add 1/4 cup water. Simmer until soft, about 20 minutes.
Combine celery, carrots, ham bone, onion, leek, parsley, and allspice in a large saucepan. Cover with water. Bring to a boil; reduce heat and simmer until flavors combine, about 40 minutes. Stir in potatoes and garlic; cook until potatoes are soft, about 15 minutes. Remove ham bone.
Stir grated pickles and cooking liquid into the saucepan. Season soup with marjoram, salt, and pepper.
Mix heavy cream and flour together in a small bowl until smooth. Stir into the soup.