My impression of Marx’s understanding of theory and praxis is that the transition from capitalism to socialism is contingent on the historical circumstances at any given point in time. The logic of capital creates certain preconditions that set the stage for the transition, but the transition is by no means guaranteed to unfold, or unfold in a clearly predictable manner. One of the preconditions is the concentration of capital into the hands of few and the general tendency toward increasing relative poverty of workers. Another precondition is the gathering together of labor in factories and other firms. In this way, capital is increasing the social character of labor such that workers are now producing together under one roof. There are other preconditions such as the tendency toward economic crisis, but this gives you the general idea.
Marx’s understanding of theory and praxis is the ability to discern these tendencies in the current economic system to provide an analysis of a future economic system that does not contain the flaws of earlier systems. By understanding scientifically the contemporary economic system, the hope is that this knowledge can be used to guide the transition to a more equitable social system. Marx would not assert that it is possible to “engineer” a new society, but that social movements, the social interaction of people to control and direct the means of production in society, must unfold in ways that are specific to the historical circumstances those people encounter. The form, speed, and character of any revolution will unfold historically in a dialectic relationship between the movement and the forces that oppose it.
Marx’s The 18th Brumaire of Louis Bonaparte is an example of how Marx analyzed a potential proletarian revolution. This is the text where Marx asserts, “[People] make their own history, but they do not make it just as they please; they do not make it under circumstances chosen by themselves, but under circumstances directly encountered, given and transmitted from the past.” I think this is a great text to get a sense of how to analyze a historical event through a historical materialist lens, but it may not answer your question directly.
There is a collected work that may better answer your question. If you can find a copy ofThe collection Marx, Engels, Lenin on Scientific Communism may provide a good resource to investigate your question a bit further. In this collection, Marx and Engels discuss the inevitability of the self-destructive nature of capital. For example, they state, “On the one hand, it has eminently developed the productive forces of society; on the other hand, however, it has demonstrated its own incompatibility with the forces that it has itself brought into existence. Its history is a history of antagonisms, crises, conflicts and disasters.” Under communism, by contrast, production is not controlled by a single individual, but by the will of the people in society. “Communism as the positive transcendence of private property, as human self-estrangement, and therefore as the real appropriation of the human essence by and for man; communism therefore as the complete return of man to himself as a social (i.e., human) being–a return become conscious, and accomplished with the entire wealth of previous development.” In this way, Marx outlines what is necessary in a communist society, but not a rigid process for achieving it.
Personally, I would caution against using Marx and Engels’ more inspirational works like The Communist Manifesto to understand their perspective on historical transition. Popular works like The Manifesto are meant to incite workers to action, and the ideas in it are more thoroughly investigated in his later work. In chapter 5 of Marx, Engels, Lenin on Scientific Communism, Engels outlines specific policies in the transition from capitalism to communism. These policies are asserted historically, and not as a means to engineer society. I would also suggest viewing Marx and Engels’ views on the transition differently from Lenin’s. Marx and Engels worked very closely together, while Lenin had his own interpretation of Marx’s ideas.
Because Marx understood society historically, he also understood any transition would have to depend on the historical conditions under which it occurred. The scientific understanding of the laws that govern any historical economic form do not necessarily provide the blueprint for a transition to a different economic form. The tendencies of any economic form may outline the flaws, but do not necessarily serve to guide revolutionary practice. Any “engineering” would need to be specific to the transition as it took place in a specific geographic region at a specific historical moment in time.