Glad you got the cup out.
For a lot of similar removals on cars or equipment, the suggestion is to use an air impact hammer. Lots of small impacts rather than a few big whops from a sledge.
Most of my headset removal, I'll find a big Crescent wrench and adjust it to grab loosely around the head tube and rest on the cup and pound the cup out. No special tool.