This question comes up quite a bit in discussing removing rust from painted steel. This particularly tends to impact bicycle frames, fenders, and chainguards.
Oxalic Acid use involves a chemical removal of rust. You dissolve the crystals in water, then expose the parts to the solution. This could involve submerging in a tank or it could involve "bandages" soaked with the solution applied to the painted surface. Either way, the Acid reacts with the oxidized portions of the metal, causing the rust to "wash away", while leaving solid paint or chrome intact. Beware that if rust has gotten underneath the paint or plating, it too will "wash off" as it flakes away in the solution. The more concentrated the solution, the faster rust washes away, but the more threat posed to paint.
WD40 and 0000 Steel Wool involves removal of rust by simply applying the WD40 to the surface, then rubbing with the steel wool gently to remove the rust. A gentle brushing will remove rust while leaving solid paint intact. Any loose paint again will "flake" away. This runs the risk of scratching the paint if you bear down too hard. It is also possible to leave fine filing of steel wool on the surface, which later can rust again.
So which is "better". The short answer is "it depends". I have two fenders from the same bike and same condition below as examples- the fender on the left involved Oxalic Acid treatment, while the right
Above you see the Oxalic Acid fender at the top and the WD 40/Steel Wool fender at the bottom again.
So the Oxalic Acid does a better job at reaching down to the bare metal, even in very small pits. It really gets everything if you keep at it and know how to use the solution. The Acid did not ruin the paint, and I was able to do other tasks while the part soaked. The downside is that this fender does not look as "natural" as it could. You have faded paint, some honest wear, but then you have bare metal spots. Further treatment is needed to make this more "natural" looking. This soak took about 90 minutes.
The WD 40 with Steel Wool produced more "natural" results. By "natural", I mean the consistent of this fender is more consistent. You have faded paint and you have some rust, but the rust spots blend in with the paint to form a "relic" look. You don't have the glaring, bare metal that the Acid produces.
The bottom line is that WD 40 with Steel Wool and Oxalic Acid will both remove rust. Both need to be used carefully. But Oxalic Acid will more completely remove rust, even from small pits. If you plan to then clean the paint further or "fill" the small holes with matching paint, this is great. If you want to just leave it as is after exiting the soak, you'll have an odd condition of faded, "relic" paint and bright, bare metal. Meanwhile, the WD40 is not as "complete" a rust removal, but will leave you with a more balanced, natural "relic" look. Each therefore has its place, and it depends entirely on if you're going for a more thorough clean up with "touch up" or if you are going for pure relic/originality.