In a soup pot, sauté onion, carrot, celery, and bell pepper in fat over medium low heat until vegetables are wilted and onions are translucent. Stir in flour. Cook, stirring, for a couple of minutes. Pour in the chicken stock, stirring well to get up anything stuck to the bottom of the pot.
Raise the heat to medium high and add the ham, potatoes, salt, pepper, and cayenne if using. Bring to a boil and turn heat to low. Simmer until a small knife easily pierces the potatoes all the way through. Using a hand held potato masher or a big wooden spoon, break up the potatoes a bit.
Add the corn and simmer another 10 minutes. Stir in the cream and adjust seasoning. Serve hot, garnished as you like.