How did proponents of this theory counter the obvious objection that work can be squandered?
Anything valuable can be squandered. Why should labor be any different?
You’d think so; but at times some Marxist-inspired regimes acted as though they believed that labor automatically translated into wealth.
If you get enough people laboring for you, you can get wealthy.

You’d think so; but at times some Marxist-inspired regimes acted as though they believed that labor automatically translated into wealth.
What does this mean? What actions did they take and how do they demonstrate a belief that labor is automatically transformed into wealth?

What actions did they take and how do they demonstrate a belief that labor is automatically transformed into wealth?
They didn’t. Marx took it as axiomatic that labor translated to value. Since that’s obviously stupid, he later expanded the definition to “socially necessary labor”, but that’s basically tautological and useless.

Since that’s obviously stupid, he later expanded the definition to “socially necessary labor”, but that’s basically tautological and useless.
I don’t understand why that’s tautological. Please explain.

I don’t understand why that’s tautological.
Well, what is value? It’s the measure of how useful something is, like the nutritional value of food or the quality of shoes or how much the healthcare increases lifespan, as well as a measure of how happy it makes people (which is often the same as utility). In other words, all that stuff which is socially necessary, assuming you want your society to be healthy and happy. So Marx’s definition tells you nothing beyond what you already knew.
The hard question is how we determine value, because it’s almost completely relative. Is thing A more valuable than thing B? If so, we should prioritize thing A. But that value judgment is also completely individual; one person may want a nice house and another a nice car. Society has limited resources and has to concentrate on the things with the most value. But determining that value is very difficult.
In a free(ish) market society, we use money to determine value. People can decide which things to purchase and the market adjusts to supply those things that pay the most. If supply increases too much, the price goes down and suppliers make other things.
Without a market, you need someone to decide what’s “socially necessary”. Sometimes this isn’t too hard to figure out, like the case with healthcare, since mostly people have the same ideas about what constitutes good health, and it’s fundamentally biological anyway. So many societies have healthcare systems that aren’t entirely market based. But for most other things, value is extremely subjective and we have no way to measure it except by giving people a share of the total resources and letting them decide for themselves–i.e., they buy things with money.
I have thought about this, and so did Marx, and so have many other people. One might be (though this is open to argument) in a situation where, due to inefficiency or various other factors, one is getting ripped off on the price of a carton of milk, paying too much (or choosing not to buy) and knowing it, and cannot get a better deal across the street or anywhere else in town. Point is, the market “measures” something but it is not what you want to know: how much is that carton of milk really worth? When you sit down to model this mathematically and calculate from first principles, you very very quickly run into the problem of absurd complexity of the situation, though I am not discounting the possibility that with the right approach and computational resources you can get somewhere; in fact I could suggest some avenues of research. However, even all that is not attempting to touch on issues of what is fundamental or “socially necessary” (and the last is not a good description anyway since capitalism or even money are not necessary at all; one needs to define one’s axioms).
In the OP, what does “work can be squandered” mean?
Out of curiosity, I asked my friendly chatbot; "How did proponents of Marxist theory counter the obvious objection that work can be squandered?
This is the reply:
According to some sources, proponents of Marxist theory argued that work can be squandered only under capitalism, which creates a system of exploitation, alienation, and ideological control. They claimed that under socialism, work would be a free and creative activity that would
benefit the whole society.
I am not sure that it helps.

In the OP what does “work can be squandered” mean?
The history of the Soviet Union contains innumerable instances of extremely poor planning that more or less wasted all the input that was applied to those decisions. Trying to grow wheat in Siberia is just one example. Another example that’s fictional (but all too imaginable that it could have really happened) was parking a trainload of cattle on a siding for a week and having the cattle all be dead by the time the snafu was straightened out. And then, since no live cattle were delivered, telling the cattle raisers that they didn’t meet their quota.

I am not sure that it helps.
Then why cut and paste bot-generated bullshit, or indeed any other bullshit?
Anyway even a cursory glance at Wikipedia will tell you that
The classical school of economics believed in a concept called the labor theory of value which emphasized the idea that the amount of time it took to produce a good determined the value of that good. This concept’s rival, marginal utility on the other hand, focused on the value that the consumer received from the good when determining its value.
and mention early work by people like Walras. In any case, the question was answered in Post #2.
What does poor planning have to do with Marx’s theories?

The history of the Soviet Union contains innumerable instances of extremely poor planning that more or less wasted all the input that was applied to those decisions
This is absolutely true, and has to do with the long history of corruption in both the USSR and in the Russian Empire and Federation which preceded and followed it.
It did not occur because the Soviets believed that simply using labor would automatically create value.

Trying to grow wheat in Siberia is just one example.
That’s a great example, because it had nothing to do with a labor theory of value. Stalin personally favored Lysenko, and so many traditional geneticists who nontheless were loyal Communists were purged to ensure Lysenkoism would be the dominant (or only) form of Soviet genetics. And Lysenkoism was complete bunk.

Another example that’s fictional (but all too imaginable that it could have really happened) was parking a trainload of cattle on a siding for a week and having the cattle all be dead by the time the snafu was straightened out. And then, since no live cattle were delivered, telling the cattle raisers that they didn’t meet their quota.
Being a fictional example, it is of course of very limited utility. But it is easy to imagine something like this happening because it is a feature of Russian culture - again, both pre- and post- Communism.
The motivation behind a scenario like the one you describe isn’t a misguided belief that so long as workers are using up labor the value would follow even if the cows are dead.
Rather, it is the concept of Vranyo - when I lie to you, and you know I am lying, but it would be easier for both of us if the lie were true; so we both sign off on it and let our supervisor deal with the problem.
Perun did an excellent video on the enormous problems that the culture of vranyo causes the Russian army in Ukraine today, but it is certainly not limited to military operations.
The situation you describe, if it had actually occurred, would best be explained by vranyo, not ideology. Someone screwed up and got the cows killed, but rather than deal with the situation, both they and the person receiving the dead cows agree to pretend everything is alright and let this be someone else’s problem.

What does poor planning have to do with Marx’s theories?
It’s an easy way to dismiss his entire body of work, both the nonsense and the valid critiques of capitalism, in one fell swoop?

What does poor planning have to do with Marx’s theories?
;
It shows real-world situations in which Marx’s theories are, if not a priori wrong, then simply inapplicable.

It shows real-world situations in which Marx’s theories are, if not a priori wrong, then simply inapplicable
Are you under the impression that those situations occurred because of Marxist theory?
One could simply assume that, on average, everyone incurs about the same amount of inefficiency and number of screw ups.
Where there is societal acceptance of inefficiency, the economy doesn’t do so well. But the premise of making labour essentially a fungible entity isn’t contradicted.
What isn’t protected against is increasing indolence and indifference from the working people.

One could simply assume that, on average, everyone incurs about the same amount of inefficiency and number of screw ups.
I would say that the rate of screw-ups is roughly constant, since we’re all human. But what’s needed is a feedback loop, so that the screw-ups can be easily detected, and to sort the competent from the incompetent. In a market economy, enough screw-ups eventually put a company out of business (though it can take a while). In a command economy, incompetence can persist forever, or at least until the country collapses.
No one has yet found a feedback system that works better than the market. Well, aside from nature herself, which can’t be gamed even in principle. Physical law prevails even when markets don’t.