In a sway condition, if you have lots of room ahead, brake briefly then accelerate and it will calm down. Slow steady braking will do the same thing, the cars behind you will already be giving you room when they see the trailer swaying.
Had to do it once or twice before I learned to always load the tongue a little extra heavy.