EDIT: It
turned out the problem was the base on the optocoupler should not be left floating!
I have this:

I know this is not ideal and if doing it over I'd use a proper transmission line setup. I will go that route if I must, but for now I'm playing with this 1) to salvage it if possible, and 2) for the experience to improve my understanding.
I'm sending a signal at 400 baud, so 2.5ms between transitions. Most often it works perfectly, between pins 11 and 12:

Once in a while it looks like this:

When this happens, there are about 1-6 dips and they are ~0.7ms apart. In all these tests, the "long wire" is about 14" of ethernet.
This doesn't seem to be EMI, as the signal is stable except after a low to high transition, and even then it only happens once in a while.
Another pic of the anomaly:

What could be the cause? Is it reflections in the 14" cable? Why does it only happen sometimes?
Starting from the source, here's between pins 1 and 2:

Nice and clean. Between pins 4 and 5:

Some noise, I wonder if this is the problem already?
Next, how might I ignore this noise? Yes, use a proper transmission line!

I may still do that. Scrapping everything would be a lot of work and cost. Scrapping only the receiver is less than 1/10th the effort and even less cost.
0.7ms = ~1.4kHz. I could use an RC filter < 1.4kHz and > 400Hz. Maybe 800Hz or so? Is that likely to clean up the signal enough to make receiving reliable? I know questions like that are not really unanswerable. Maybe instead: Is an RC filter the right approach to condition the signal so the dips don't interfere with decoding?