Preheat oven to 400 degrees. Place crab shells in a large roasting pan and roast in oven for 10 minutes.
Transfer roasted shells to a large stockpot; add water to cover shells, plus one inch (but no more than one inch).
On medium-high heat, slowly heat shells until tiny bubbles appear. Reduce heat to medium. Do not let water boil; maintain just below a simmer.
Place the thyme, bay leaf, and parsley in cheesecloth; secure cheesecloth with kitchen twine to make a bouquet garni.
Add wine, onions, carrots, celery, bouquet garni, and peppercorns. Reduce heat and maintain a low simmer for 30 minutes.
Strain stock through a fine-mesh strainer; discard solids. Use stock right away, or cool and freeze for future use.