The idea of the communist revoluton through socialism is that the socialist state was intended to eventually destroy itself and the society will live in a communist system.
That's an often repeated quote from Engels as far as I know, but while not false it's kinda misleading.
Marx's idea of history is one of class struggle. So the state is essentially the upper class asserting force on the lower class to exploit them for personal gains. That is a structure of the few ruling the many. So when he looks at history he sees it as the classes somewhat leapfrogging. So while the upper class become fat and lazy the lower class develops harness their skills and abilities and develop the material methods to revolutionize the society and become the upper class.
So in his interpretation of history the mode of production of society, determines it's social order and all that manifests in a progress from the rule of the few to the rule of the many. As the lower classes regularly overcome shortcomings with skill and organization.
Now capitalism defeating feudalism marks another such progression in which the productive outcome of factories and manufacturing had pushed traditional agriculture and skilled production (the mode of production before that) out of business. Instead factories now produced large quantities of commodities (products made for sale rather than consumption). Replacing trade product for money for product with trades of money for commodity production for even more money.
Though it also reduces the work of a worker to that of a standardized work unit without any skill, so it eroded the (in Marx's mind) classical way of historic progress. And left to it's own devices it lead to massive accumulation in the hands of the capital owners and an impoverishing of the lower class. Who were at the time still politically disenfranchised as all that democracy stuff people talked about was still only for the rich.
So "the state" to them was this oppressive system of police and authority that ensured property for the rich and kept the working class down.
So what Marx saw as remedy was the working class organizing as one large institution and as such undeniably demand political and economic power. That is the ownership of the means of production that they were already the major moving parts in. Like you can run a factory without boss, but you can't run it without workers.
And while social democrats were often already fine with improved working and living conditions, Marx was pretty much dead set that what makes or breaks capitalism is the ownership of the means of production and that's what the workers should demand and strike for, if necessary (and he thought it was) by revolution and just taking it by force (assuming they already are the majority).
So in that conception, this revolution somewhat would become the end of history (as he knew it), because now there would be no other class left. Previously the ruling class subjugated the working class, but now the working class would BE the ruling class and there's no other class to subjugate. So in consequence the entire reason for the state to exist would wither away. Of course the worker could try to subjugate each other, but Marx thought the majority would be smart enough to realize "Wait we had that already and it sucks, if they subjugate these other workers what's stopping them for subjugating me as well" and would thus either revolt further till that bullshit is stopped, like you'd still need to subjugate a majority for a system of exploitation and you'd already have an organized combat ready majority to push back against that.
So he expected some back and forth, but rather sooner than later that would give rise to communism and the overcoming of such nonsense and after that people would through industrialization have a surplus economy and through collective ownership of the means of production would have a de facto democracy and thus would have something to decide about (the surplus of their work) and would finally have the ability to decide about that by themselves (democracy).
So in that frame of reference no one who had just risked their lives to throw off the shackles of slavery would voluntarily go back to working for someone else for a fraction of what that person gains from their work. So in the first stage after capitalism they might want to try exchanging work in equal quantities and in higher stages of communism would simply produce shit in sufficient amounts, so that there is enough for everyone and than decide democratically how they would spend their labor for both their own benefit and/or the benefit of the community.
Also Marx thought that in accord to what liberals portrait as history. Free people would have improved production (so free workers would buff output) as well as that it would be the highest, late stage of capitalism that would have the revolution.
Ironically it was the lowest stages of capitalism, just at the end of failing feudalism that saw a revolution. Which Marx would have pronounced a dead end as it's that leap frogging in mode of production that he assumed would bring society forward, so just replacing a king with another king is stagnation.
Same for having revolutions by a socialist minority party. Like a government is still a government, the best they could do is develop the means of production so that eventually the lower classes would be numerous and powerful to overthrow them.
Though once in government few people intent for the lower classes to overthrow them and being disciples of conditions that taught them to look for their own bottom line and to fuck over the rest, these governments basically head to prevent the people from redistributing products and settle with it, so that after they were eaten up they'd fall right back to feudalism, but that they should develop the means of production. So they became state capitalists, they exploited their working class, traded with other capitalists (at first tried to prevent that but especially China is pretty much doing that galore) and invest in their businesses.
Now ideally the people would revolt against that take the means of production and ... communism. But also you have an upper class that knows that, that profits from this system and that likely has no interest in doing that, so they likely talk a whole lot about it so that people forget what that even means but never actually get to doing any of that, but always postpone that.
So the anarcho-communists, aren't really a fan of having such an intermediate state as it is basically antithetical to their goal and they would go straight for communism without.
Now it is dubious as to whether Marx's perception of history is true to begin with. I mean it probably made a lot of sense at the time, given that the enlightenment thinkers, the classical liberals and the proponents of progress and the industrial revolution actually wrote down history as such it culminated in their glorious revolutions that brought about liberty, equality and brotherhood, with a lot of asterisks for those whom that did not apply... But it's also possible that not all rulers were downright evil oppressors and that most of these systems aren't even possible without the "consent" (lack of resistance) of the oppressed, that progress of the means of production might have also been in the interest of the ruling class as otherwise they'd be stuck in stagnation and on the brink of starvation, famines, wars and whatnot that they often just narrowly escaped.
So the grand narratives of class warfare, race warfare, natural hierarchies, god given rulership, ... are probably all lies to begin with and the "power" or the absence of it might only in the extremes be that black and white and otherwise might take up more complex shades of grey where it's not done with a revolution and where it's not done with taking over the power. So Marx idea of changing the structure of power by changing how we produce, how we structure our economy and output, might have been more reasonable than Lenin's approach (though the latter being more successful). The other problem is that the conditions in which we live also shape how we survive, how we organize and how we produce and with beating hunger and famines, we've also encountered a whole set of new problems that keep us from being content.
And ideally those who like to seek power have a strong incentive to make people be never content with what they have so that they keep sacrificing themselves for progress (usually the progress of someone else, but believing it's their own).
Yet this quest for progress was also part of Marx's narrative, that would progress history, so yeah it might suffer from the same problem.
Now anarcho-capitalism is not anarchism to begin with, but just a deregulated capitalism, that most likely gives rise to a neo-feudalism where wealth accumulates with the wealthy, until that economic power also breeds centers of political and social power or gets overthrown by a revolution.
While the classical anarchism at least theoretically got that liberty of the individual that goes against the liberty of other individuals is not liberty but privilege and that true anarchism could only be attained with freedom and equality and that neither one alone is sufficient. Though whether that would be a system or an ideal to strive for, which could also be what Marx had in mind and what path leads there is a topic of probably never ending discussion.