Just brought a E34 525i se recently it already had a towbar fitted but no wiring WTF!
Having read about the wiring issues, I understand why it was not wired up.
I salvaged 4x relays out of an old Nissan: LH Turn, RH Turn, Tail, Stop lights. one side of all relay coils were common-ed to earth, the other side of each coil was connected to the +ve wire for each light.
I then connected one side of each relay to a suitable 12v wire, the other side of the relay went fused to the appropriate wire on the trailer plug.
Works Perfectly with no issues, relay/fuse box fits neatly out of sight in the little recess below the tail light assembly.
Of course bulb monitoring for trailer does not work, nor does the towing mod. signals to auto transmission,
but no worries drives great.