Zen came to Japan comparatively late, so you can't call it the "Buddhism of the ruling classes" anywhere, but Japan. And remember the ruling classes will take anything that shows a truth and bend it to the aim of keeping themselves in power. Witness how today they morph the legacy of M. L. King into a caricature of what his message actually was.
Zen originated in India (like all Buddhism does) as a Hindu heresy, but it was actually developed in China as Ch'aun. Shao Lin was the original Zen and it wasn't a ruling class religion or philosophy. The monks were very egalitarian. They took in anybody that met their criteria. The martial aspects of Shao Lin is probably why the warrior class in Japan adopted Ch'aun and morphed it into Zen. As with MOST of medevial Japanese culture, they would take the surface parts of Chinese culture and adopt them WITHOUT taking into account the rich cultural basis and subtlies of the culture that they adopted from.
Now as to whether Zen can teach anything to Marxism, I don't have any thoughts on that as a general rule. I'm somewhat unique in I've had 40 years of Marxist training and 31 years of traditional Kung Fu training which is Zen based, so I'm going to approach Marx in a Zen fashion anyway. But then I approach ALL my life in a Zen fashion. And it's not a religious thing, because you can be a materialist and follow Zen. Zen (like all Buddhism really) makes no provisions or teachings on an afterlife or even God. Buddhism is strictly a method (or philosophy) for living in this world of the here and now. To fundamental Buddhism, the afterlife or God isn't an issue to be concerned with.
To me, there are some similiarities between Marxism and Buddhism. As you mentioned, nothing is dogma in either philosophy. They both are concerned with the here and now and not with an afterlife. As a rule, they're both egalitarian. There are also differences, to me primarily with the acceptance of "what is". But if the Buddhist concept like the adage above leads a Marxist to question whether he's applying general Marxist teachings or is making a dogma of it, then that's not a bad thing.