Just had dealer program mine, still working through some testing to see if it is all correct. During programming they had a similar issue with the brake lights failing to function. They diagnosed it as a bad pin in the wiring harness that you listed below. One of the pins was not correctly installed and had intermittent contact. They replaced the pin in the harness as "warranty" as I purchased the harness from the dealer. You may want to start there as it sounds like MB has some issues with quality control in those wiring harnesses.
I've been reading this thread on the forum and have been trying to install the tow package on my dad's van. The parts I have installed are a aftermarket hitch, 020-545-40-26 Socket, 447-540-63-36 electrical wiring harness, and 447-900-4105 trailer recognition control unit.
All components have been installed and the MB dealership has programmed the trailer recognition control per AN31.10-S-8080E.
All of the trailer lighting works, but the trailer brake lights. MB has tested on their trailer panel and everything works, but the brake lights. MB says they will need more time to troubleshoot the issue. I saw that for John Gooch that the brake signal was obtained by tapping into drivers rear brake light.
Has anyone encountered this issue?