A common misreading of Marx stems from interpreting the Labor Theory of Value as a trans-historical theory. It's not! It's a theory of how value is created given a specific process of production, in Marx's use-case, Capitalism.
In regards to automation, Marx actually did discuss it conceptually in the Grundrisse. I will place together some selected quotes from the short section,
Contradiction between the Foundation of Bourgeois Production (value as measure) and its Development. Machines etc.:
The exchange of living labour for objectified labour – i.e. the positing of social labour in the form of the contradiction of capital and wage labour – is the ultimate development of the value-relation and of production resting on value. Its presupposition is – and remains – the mass of direct labour time, the quantity of labour employed, as the determinant factor in the production of wealth. But to the degree that large industry develops, the creation of real wealth comes to depend less on labour time and on the amount of labour employed than on the power of the agencies set in motion during labour time, whose ‘powerful effectiveness’ is itself in turn out of all proportion to the direct labour time spent on their production, but depends rather on the general state of science and on the progress of technology, or the application of this science to production....Real wealth manifests itself, rather – and large industry reveals this – in the monstrous disproportion between the labour time applied, and its product, as well as in the qualitative imbalance between labour, reduced to a pure abstraction, and the power of the production process it superintends. Labour no longer appears so much to be included within the production process; rather, the human being comes to relate more as watchman and regulator to the production process itself....The theft of alien labour time, on which the present wealth is based, appears a miserable foundation in face of this new one, created by large-scale industry itself. As soon as labour in the direct form has ceased to be the great well-spring of wealth, labour time ceases and must cease to be its measure, and hence exchange value [must cease to be the measure] of use value. The surplus labour of the mass has ceased to be the condition for the development of general wealth, just as the non-labour of the few, for the development of the general powers of the human head....With that, production based on exchange value breaks down, and the direct, material production process is stripped of the form of penury and antithesis. The free development of individualities, and hence not the reduction of necessary labour time so as to posit surplus labour, but rather the general reduction of the necessary labour of society to a minimum, which then corresponds to the artistic, scientific etc. development of the individuals in the time set free, and with the means created, for all of them.
To paraphrase, what Marx is saying is that as Capitalism continues to develop labor-saving technology, Capitalists can invest more in fixed capital (i.e. Machines) here also referred to as "Objectified Labor" rather than "Living Labor" (i.e. the workers). The end result of this potential process would be solely automated production. But, this in turn would transform the Labor Theory of Value as well into something applicable in a post-Capitalist society when living labor i.e. the working class is rendered moot in the production process.
Marx continues:
On the one side, then, it calls to life all the powers of science and of nature, as of social combination and of social intercourse, in order to make the creation of wealth independent (relatively) of the labour time employed on it. On the other side, it wants to use labour time as the measuring rod for the giant social forces thereby created, and to confine them within the limits required to maintain the already created value as value. Forces of production and social relations – two different sides of the development of the social individual – appear to capital as mere means, and are merely means for it to produce on its limited foundation. In fact, however, they are the material conditions to blow this foundation sky-high.
This is such an interesting passage. Marx is saying here that on one side automated machinery can create wealth regardless of labor time (i.e. necessary labor time) that is employed into the production process. But on the other hand, Capital still seeks to measure value (and as a corollary, price, and wealth) based on necessary labor time. Capital, according to Marx, "becomes a moving contradiction that it presses to reduce labour time to a minimum, while it posits labour time, on the other side, as sole measure and source of wealth."
This contradiction leads to a material condition which can "blow this foundation sky-high", in other words the Labor Theory of Value becomes irrelevant, we've moved past it to something else! A Theory of Value based on automated machine power.
But this poses a looming question and places humanity at an important crossroad. Who owns the automated machinery and as a corollary, who owns the profits and wealth created by the machines? If they are owned by a minority of Capitalists then we may have something that looks similar to Blade Runner, where mega-trillionaires own the vast majority of wealth, most people are unemployed and are sustained through a measly Andrew Yang-style UBI at the cost of public support. If they are owned by the people, with the created wealth flowing back to the public, maybe we can see a more Star Trek like society where everyone's needs are met, housing, food, health etc., with disposable time open up to free development, personal, intellectual, social etc.
Marx continues in this section to say:
‘Truly wealthy a nation, when the working day is 6 rather than 12 hours. Wealth is not command over surplus labour time’ (real wealth), ‘but rather, disposable time outside that needed in direct production, for every individual and the whole society.’
Wealth here isn't the accumulation of profits, or commodities etc., it is the disposable time "for every individual and the whole of society" beyond what is required by individuals in the production process.