Running on 12 volts down the road is obviously the safest way, in respect to open flame danger.
The small wire 12 volt supply you get from your tow vehicle will not supply enough current to keep your battery up under the refrigerator heater element load. That wire is there to keep your battery up for the emergency brake disconnect system on the trailer. Having a discharged trailer brake battery source going down the highway might make the emergency brake system ineffective when needed. This does NOT affect your regular trailer braking, which uses your tow vehicle battery.
Many people have wired in a special, larger, wire from the tow vehicle battery, through a relay (or solid state isolator), through a self-resetting DC circuit breaker, to a seperate connector at the back of the truck, to a seperate set of larger positive and ground wires, going into the trailer directly to the battery and frame. The positive wire connecting to the trailer battery should have another self-resetting circuit breaker to guard against wiring shorts. This is akin to what is used in a motorhome for charging the "house" batteries from the motorhome engine batteries.
The option for us that don't have 12 volt refrigerators is to install the extra charging cables as above, add a correctly sized inverter, and have the frig on inverter 110 VAC power going down the road. Many people say that there is little heat loss in a closed refrigerator going down the road. I haven't tried it, as my wife is more nervous about food safety.