You want to pin down absolute definitions of idealism vs materialism, capitalism vs socialism, but the precise meanings of these words are not agreed by all thinkers if they are consciously defined at all. Many thinkers who are called idealist did not self-identify as such, same for capitalist economists.
These terms ought to be considered as post-hoc groupings of an eclectic set of philosophies, even contradictory ones. So what definition of idealism are you applying?
there are no serious incompatibilities between idealism and Marxism
How can this be? Marx wrote a bunch of polemics against idealism. The German Ideology notably, but also the Gotha Critique, Theses on Feuerbach, Economic and Philosophic Manuscripts (1844). Are you defining Marxism as the school that emerged after Marx, or Marx himself?
Marx and Engels clarified many of their ideas through their critical readings and polemics.
I can’t recall where — I think a preface to one of Marx’s works — Engels describes how the publishing of the work was not important in the end; that the important thing was the clarification of their own ideas through the effort of refuting their opponents. I think it was against Proudhon or Stirner… can’t remember…