Nope, it's not a settled question in the way that I think you mean. Each ToS is different so each would be subject to individual legal analysis in court on its own terms.
Questions would include whether the ToS is unconscionable, whether the terms violate laws of the locality/nation, and so forth.
It's the same with traditional contracts - the fact that contracts have been around for hundreds (maybe thousands) of years doesn't mean much if you and I create a brand new one between us. Our contract's specific terms (and events/actions between us as a result) would be the issue in court.
So, under the current state of the law whether or not a contract is enforceable depends entirely on what the terms in that specific contract are.
Unfortunately, this is yet another instance where the law has failed to keep up with technology. Contract laws (at least in the USA) date back long before anyone ever dreamed up the idea of a EULA or ToS. Our laws contemplate two or more parties with roughly equal bargaining power sitting down and hashing things out, and go from there.
Laws based on that assumption are a pretty poor fit for a world filled with EULAs and ToS but it's what we are stuck with at the moment.
That's like saying "If the gun fires the bullet, who is liable for murder?" It's a silly question.
I don't know I've seen several people unironically argue that it should be the gun's manufacturer.
With software of course it is a little complicated because:
* it can be produced really easily in a distributed fashion over the internet by anonymous people in many jurisdictions, so there isn't always an obvious company or entity to sue
* most automation tools can be repurposed for malicious use (nobody would sue John Deere because their tractors can be armored and turned into pseudo-tank things)
In general I meant there is a difference between criminal and civil law, and suing generally refers to civil not criminal law.
[0] https://www.merriam-webster.com/dictionary/press%20charges
Does violating a website's TOS meant your accessing it beyond your authority, making it a violation of the US's Computer Fraud and Abuse Act?
I wondered if the interplay of those two concepts muddied the waters.
Essentially, having that be true would mean that any given website could create whole new classes of criminal behavior.
While this is true, reading the lawsuit it is clear that Meta is suing in civil court, so maybe they're trying to enforce their contract, especially their automated collection ToS (https://www.facebook.com/apps/site_scraping_tos_terms.php)?