Even in Marx and Engels time,
“It is this counterpressure of the productive forces, in their mighty upward growth, against their character as capital, this increasingly compulsive drive for the recognition of their social nature, which forces the capitalist class itself to treat them more and more as social productive forces, as far as this is at all possible within the framework of capitalist relations. The period of industrial boom with its unlimited credit inflation no less than the crash itself operating through the collapse of large capitalist establishments, drives towards that form of the socialisation of larger masses of means of production which we find in the various kinds of joint-stock companies. Many of these means of production and communication are so colossal from the outset that, like the railways, they exclude all other forms of capitalistic exploitation. At a certain stage of development this form, too, no longer suffices; [the large-scale producers in one and the same branch of industry in a country unite in a “trust”, an association for regulating production.” (p 357-8)
Within the confines of capitalism, even this increasing regulation, planning and monopoly of production continually, and cyclically hits the buffers, because commodity production implies continued competition, even if it is, now, monopolistic/oligopolistic competition. To overcome that requires an ever larger single market, regulated by an ever larger state. Either the nation state annexes other nation states – resulting in imperialist wars – or else those states voluntarily associate. In Theories of Surplus Value, Marx noted that private industrial capital was the inevitable means, the historically necessary condition for the centralisation of the means of production, because, although considered abstractly, there was no reason why the independent commodity producers could not have done so, by forming a cooperative, in reality, no such development was possible.
There was no reason such producers would do so, and their individual relation to their own means of production engendered a powerful, individualist and competitive mindset within them that precluded it. Kautsky found the same thing. It is only when wage-workers, who have developed a collectivist ideology emerge that they are able to bring about the creation of such producer cooperatives. When peasant farmers create cooperatives, faced with competition from large capitalist farms, they usually establish marketing cooperatives and cooperatives for the shared use of very expensive machinery, rather than voluntarily turning themselves into an agricultural cooperative.
Fairly equal nation states are unlikely to voluntarily merge for similar reasons. Each one believes it will come out on top in the global competitive struggle, including when it becomes a military struggle. Only when a series of smaller nation states realise that their only hope is to combine, if they are to compete with larger states, are they likely to do so, as with the creation of the EU. Even then, formerly dominant nation states seek to assert themselves within the bloc. One reason the EU has not moved more quickly to the creation even of a centralised federal state is the continued protection of existing interests by national elites. The working-class has no reason to constrain its voluntary association across existing national borders, which have become an outdated anachronism, not just holding back human progress, but threatening humanity itself, as those national borders form the basis around which wars are fought, wars which, now, lead to thermonuclear destruction.