I am not so sure that air in the lines is going to cause this issue.
Air in the lines is bad because air is compressible. If you have air in the lines, the air compresses instead of transferring the master cylinder pressure via fluid to the brakes. That means that as your trailer slides forward, the pressure in the master cylinder is compressing the air instead of moving brake fluid to the brakes, thus no brakes. I would not be looking at air in the system to cause this issue.
It sounds to me like the brakes are over adjusted or grabbing. If you are driving down the road and apply the vehicle brakes, the vehicle slows down, the boat slides forward and applies pressure to the master cylinder. The master cylinder applies pressure to the trailer brakes and the trailer begins to slow down. If the brakes are providing too much stopping force, the trailer will slow more than the vehicle and the brakes will stop applying. Keep in mind, the vehicle is still slowing down this entire time. The boat is now going to catch back up with the slowing vehicle and the brakes will apply again. When this happens, the brakes will apply too much (again) and the trailer will slow down way to much (again) and thus stop applying. I think this is a situation that can explain your problem better of hammering or whatever you want to call it.
I would look for reasons the brakes are applied too hard.