It should also be mentioned that "sway bar" and "weight distribution bars" are not necessarily the same thing. They can be, such as the Equalizer brand hitch, but more often are separate devices.
A weight distribution bar/hitch redistributes a portion of the trailer tongue weight to the tow vehicles front axle and the trailers axle(s) which prevents unloading of the tow vehicles steering capability and improves the overall handling, which can reduce trailer sway.
A trailer hitch sway bar limits lateral movement of the trailer to help control sway.
What is possibly more important that either is proper weight distribution on the trailer itself. Too much weight toward the rear will produce lots of sway. Too much weight toward the front- the receiver, hitch, tongue, and tow vehicle rear axle and frame are overloaded, and the front axle is unloaded which can cause dangerous understeer.
2012 Keystone Outback 312bh
2003 GMC Yukon XL 2500 4X4 Quadrasteer
2010 VW Routan
2007 Chrysler Pacifica AWD