As I was 20 years in 1968 and took active part of the Marxist youth movement at that time existing all over Europe, I have something to say about this, but I better restrict myself to a few comments.
First, as Scherspschutter observes, spaghetti westerns were made in a specific time, in a specific context, in a specific country, the country being Italy, the time the sixties, the context a post-war society with a lot of political turmoil, due to, among other things, the rise of left-wing politics in post-war Italy.
It doesn’t mean that the people that made these films were all Marxists. But some influential contributors were members of the Italian Communist Party, among others, Corbucci, Sollinas and Solima. However, the questions raised by left-wing politics were such that “everybody”, Marxists or not, thought they needed to relate to them. So many films did.
Second, the Zapatas did not only relate to the third world peoples fighting American imperialism, they also commented on the discussion on whether violence is justified as a mean to overthrow what was considered corrupt and illegitimate capitalist governments in the western European countries. You didn’t misread that.
Third, all the essential political spags I have seen, and I should like to add to Scherpschutters list El Bandido Malpelo and also three films closely related to the filone, A Town Called Bastard, The Wind’s Anger and Antonio das Mortes, are basically more or less critical to the prevailing Marxist ideologies of their time, so they didn’t totally side with Marxist ideologies either. Ideologies, by the way, are dangerous stuff.
What some of them did do, more or less, was siding with the anti-imperialist movements of the third world countries and the social criticism of the anti-oppressive forces in the second world countries of that time, and also introducing a different kind of roles for women as compared to the American westerns. In these respects, they were, in my opinion, quite modern films.