How to build surge brakes on bike trailer?
The simple answer to your question is yes, people have built surge brakes and they do work. Specifically, I have built one, but I called it an inertia brake.

This page has some notes and photos. The mechanism was fairly simple and robust, a telescoping towing arm with a couple of standard brake cables leading to V brakes on the front wheels of the trailer.

  

The major caveat in my opinion is that by the time the trailer is heavy enough to need these brakes it's too heavy to be towed safely behind a two wheeled bicycle. I say 'two wheeled' because in many countries legally speaking a bicycle has "two or more wheels" - so to a lawyer my quad bike is a bicycle. I built that trailer for the quad and would not suggest towing it behind a two wheeler. Mostly because if you fall off the bicycle the trailer brakes will not be applied so the trailer will roll straight over the top of you.

You may also find "does anyone sell bicycle trailers with brakes?" useful