Maybe ChatGPT of all things has solved the mystery, though I'd still appreciate an expert's opinion...
There are three prongs on the original Hella flasher relay - one is marked with 31, and one is marked with 54. It says, "31 and 54 are terminal designations based on the DIN 72552 standard," and that specifically:
31: This designates the return line to battery negative or ground.
54: This terminal is for the trailer plug connections and lighting combinations, including the brake light.
In summary, on a Hella flasher relay, terminal 31 is the ground connection, and terminal 54 is an output used for trailer lighting and brake lights.So...
Blue wire: light, or 54
Red wire: positive, or 15 (on some other flashers, not on mine).
Black wire: negative, or 31.
Hope it's right!
Ah, so:
Wire colours in the plug:
brown - to your new black
black/white/green - to your new blue
black/red/green - to your new red
Ah, many thanks!