If I plan on having a c-section, what can I do to prevent a wound infection?

Yes. Use an over the counter anti-bacterial soap on the lower abdominal area at lease 1 to 2 days before the caesarian section and do not shave the area of hair. Let the or team do the hair removal prep immediately before the delivery.
Quit smoking. And if you're a diabetic, ensure your sugars are well controlled. Many hospitals will have you bathe the night before with a special soap. Don't do any hair clipping yourself. They'll take care of that in the or.