In a past life, I used to teach "High Reliability Hand Soldering" (
NASA-STD-8739-3-2). The standard and associated course is the result of NASA discovering that the people employed by contractors didn't know how to solder correctly, and many components were failing due to poor soldering techniques. We'd spend a full week, teaching people that had been soldering for years, the correct way to do things. With examination of the student's practical tasks being done under a high powered binocular microscope.
There's a number of factors involved in the wires breaking right where the insulation meets the joint. Corrosive flux residue is one of them, the other is the solder itself wicking up the wire and causing a weakening of the wire at that point due to alloying.
Mechanical and chemical precleaning the wires and lug is important, as is the choice and amount of flux used (we used only rosin dissolved in isopropyl alcohol or pure rosin as flux), but the item that also helps the most is a set of the correct sized
anti-wicking tweezers that will minimize the wicking of the solder.
Rosin flux is virtually nonreactive and noncorrosive at normal temperature, mildly reactive to metal oxides when molten. The fluxes to look for are "Type R (non-activated rosin)" and "Type RMA (mildly-activated rosin)". Type R fluxes don't require cleaning, and type RMA fluxes are not significantly corrosive, with post soldering cleaning being preferred but optional.
For a look at the proper process, grab this PDF:
NASA Training Program Student Workbook for Hand Soldering