According to Marx and Engels, the state "withers away" (using their own words). Marx agreed with Engel's definition of communism.
Socialism is the revolutionary process that leads to a stateless society, without classes or the need for a medium of exchange or "money". The whole capitalist for-profit enterprise collapses as technology advances, automating production, and eliminating the need for human labor (waged jobs are eliminated with advanced technology). When that occurs, a rational central planning apparatus at a national scale has to be in place to meet everyone's needs. Production becomes non-profit, socialized, and democratized.
The alternative to this is techno-feudalism, where a small minority of wealthy elites own all of the technology and facilities of production and ironically, they become the high-tech communists, while the working class is consigned to the compost heap. At best, everyone will become enslaved by the tech-lords, who own all of the advanced machinery and facilities of production. The people have to take control of the means of production.
Once you cite e.g. Marx & Engels you are no more citing socialism - but an already enhanced version towards Communism - e,g, Marx Communist manifesto from 1848.
Socialism does not inherently focus onto a work class that rules everything - that is Communism.
Socialism describes any political or economic theory that says the
community, rather than individuals, should own and manage property and natural resources. And the
community does not exist primarily only out of factory-workers - especially not nowadays.
Marx & Engels focused their thoughts onto an existing pure Capitalism - run on the backs of exploited workers due to the then industrial revolution. That all these non-laborious people also profited from pure capitalism - known as the Bourgeoisie - made them an additional enemy or target for Communist ideals.
Thomas Moore in the 16th century was one of those that proposed in UTOPIA - that money has been abolished and people live and work communally.
Early socialists like Henri de Saint-Simon,
Robert Owen and Charles Fourier offered up their own models for social organization based on
cooperation rather than competition. While Saint-Simon argued for a system where the state controls production and distribution for the benefit of all society’s members, both Fourier and Owen (in France and Britain, respectively) proposed systems based on small collective communities, not a centralized state.
Robert Owen, who had owned and operated textile mills in Scotland, headed to the United States in 1825 to launch an experimental community in New Harmony, Indiana. His planned commune was based on the principles of self-sufficiency, cooperation and public ownership of property. The experiment soon failed, and Owen lost much of his fortune. More than 40 small cooperative agricultural communities inspired by Fourier’s theories, were founded across the United States. One of these, based in Red Bank, New Jersey, lasted into the 1930s.
Therefore as to how socialism is supposed to be defined as a final version, was never accomplished. Marx & Engels simply picked up on all these socialistic "ideas" - then determining by themselves that it is the worker class that should own and run everything - including the usage of money - and thus developing Communism.
Actually I am sure that you know all this.