Fundamentally, the root issue you’re running into is the deplorable quality of most no-name “DuPont” female contacts. They really only handle a few mating cycles before the contact leaf spring permanently deforms and has no holding force.

These days I basically consider them fundamentally single-use, ok to use for 2-3 cycles, so basically for installing into a gadget for internal cabling.
The Farnell 2226TG contacts mentioned above look the same as generic DuPont, but perform much better. I suspect the 2226TG are either rebadged Harwin M20, or a high-quality clone of those. I use M20 at work.
The absolute gold standard in DuPont-style contacts are the Mini-PV series, which is now sold by Amphenol, but was invented by Berg, and was indeed owned by DuPont for a while. Mini-PV uses a separate leaf spring inside each contact, made from a different alloy than the contact body. They are rated for 500 mating cycles, which means they’ll actually last even longer for undemanding applications. (Amphenol has stated that “PV” stand for “perpetual virgin”, given due to their design for long life.) I use real Mini-PV for making test leads, logic analyzer cables, etc — basically, wherever a nice strong fit is required over many mating cycles. But they are tricky to crimp without the official tools, which are $$
$$. (At home I crimp them, with some fiddling, in a tool that works beautifully and without fiddling on generic DuPont, M20, etc. At work, I can borrow the official tool from another lab, luckily.)
Unless you are pressed for space, I would use the same 10p box header as on the programmer itself, so that you can use a simple IDC ribbon cable. You don’t need all the pins but they’ll provide additional mechanical stability. The IDC cable and connectors are cheap, fast and easy to attach without special tools (a simple bench vise works great). Do yourself a favor and buy the IDC connectors with strain relief so that you can attach pull tabs, which let you unplug without pulling on the cable itself. (E.g. 3M part 3490-89110 or TE 5088450-2.)