I agree, 40cm is not that long at all but when using TxRx pairs I find there’s very little to be gained with a longer LED data wire as the differential wires can be almost as long as you like.
The data ground I referred to acts as a common ground line, but also provides an opportunity for your LED data line to be run alongside the ground line, this often helps in noisy situations.
As far as large capacitors on the the LED strips, you’ll get far better performance from making sure your power supply and power injection is handled properly. A good supply will have more than enough capacitance to handle what your strip needs provided your wiring is up tothe task as well.
So finally got to the bottom of this. I lose count of how many times I went round my board with a soldering iron but eventually found that if I wiggled the signal output cable from the output of my level shifter to the interconnect going to my matrix, it would cause various glitches on the other channel. On further inspection it looks as if the wire had been yanked somehow and I could see some broken copper strands.
I’ve replaced that wire and the lights are now rock solid. Although the resistors on the output of the level shifter helped somewhat, as did reducing the distance to the first LED, these were probably unnecessary as this is now all working even with my extension cables (which is a good thing as the the strip and matrix are quite far apart so the controller can’t be right next to both simultaneously!)
So the fault was on channel A but impacting channel B, and that was a real red herring here, particularly as channel A seemed to be functioning fine.