> Only Marx never made that claim [that capitalism tends to destroy itself].
I think that is exactly what Marx claimed. The modern producers, as reproduced under capitalist production relations, are a necessary and integral part of capitalist society. They are not a mere external appendage to capitalist societies. Can you envision a capitalist society without workers? Therefore, their emancipatory struggle is a self-destructive tendency unleashed by capitalist societies.
Correctly or not, Marx claimed that a class generated, formed, educated, and enabled by capitalist production -- a genuine product of capitalist production, the class of the modern direct producers -- was compelled by their working and living conditions (as the necessary condition for their self emancipation), to collectively appropriate society's productive wealth, overthrow capitalist relations and other alienated social structures, thereby destroying themselves as alienated producers, as proletarians, and producing themselves as a new revolutionary agent of history.
I can cite Marx extensively, but it suffices with reading carefully the first few paragraphs of Capital 1, chapter 7. Read them in their full generality. This is where Marx describes the process of production of goods ("use values", the material content of wealth). Think of the period of production as the whole span of human history. Think of the product as the concrete producers themselves (hint: Marx doesn't say that the purpose or idea with which the producer begins its engagement with the rest of nature will be exactly matched by the final product; there's room for unintended consequences). If you construe these passages in general, then the production of history (historical agency) is exactly what Marx is describing there. I am talking about section 1. If you go to the next section, the production of surplus value, you'll see how that process of production of history is hijacked (gets *alienated* from the producers) under capitalism. But if the producer is to retain its humanity as a producer, then the producer will be constantly compelled to re-appropriate her product. It follows from that discussion.
Now, one may say that this is a general statement. It's a generality, not a concrete totality. That is indeed a valid point, since Marx is here starting to unfold his argument about the "laws of motion" of the capitalist social formation. But that is a claim he is making that will be either refuted or proved over the remaining history of capitalism, which -- we hope -- won't be the remaining history of the human race.
To deny that Marx claimed that capitalism had an inherent and necessary self-destroying tendency is to say that either ((1) capitalism is fundamentally a stable, self-perpetuating society in which any challenge to the social order that may arise is a merely accidental, superficial eruption, in no way historically *necessary*, or that (2) the forces that threaten to destroy capitalism are only external to capitalist society (i.e. a demographic explosion, a climate crisis, the exhaustion of some natural resource, an alien invasion, etc.). Marx excludes the latter case, because he views our metabolism with nature as necessarily mediated by our social structures, our production relations in the first place.
I think you may be confusing the claim of the inherent and necessary self-destructive tendencies of capitalism with some sort of metaphysical or supra-historical inexorability. That, of course, is not what Marx claimed.
By the way, the precise dialectics between agency and structure has been elegantly clarified here: