Threaded headset wobbles after riding This is my first time adjusting a threaded headset.

After thoroughly cleaning, inspecting and greasing the bearings, I attempted to re-assemble the headset. The piece is interesting in that the lower cup is somehow stuck in the frame, while the higher cup threads on the steer tube, effectively being inverted to what one would expect (i.e. in order for both bearings to be facing the cups, both bearings are seated with the separators downwards and the balls pointing at the sealing). The frame has a race face to accomodate the bearing separator.

I tightened the upper cup until there was no wobble (as strongly as I can by hand and then a quarter of a turn with a wrench). Then I threaded the stopnut. The latter revealed some thread damage upon inspection, and indeed does hold only until certain tightness (maybe a couple of kilograms on a 1/3 meter wrench), then "jumps".

After riding the bike for a day through some road bumps and holes, the headset was loose again, visibly shaking.

Do I need a new headset, or is it more likely that I am assembling the thing incorrectly?
If the locknut can't be tightened down without slipping, there will be no way to keep it tight.  Hopefully the fork threads are ok and not damaged otherwise you're looking at a new fork.  Also check to see that you're using at least 5 threads for the locknut - if the locknut is being tightened on only a couple of threads it's probably not going to hold and you'll have to either remove a spacer or use a lower profile top cup or get a longer fork.