You're thinking too linearly. If Google is now responsible for illegal actions in ads, they start to require companies to indemnify Google before posting ads through Google. Google of course realizes that a shell company indemnifying them provides no protection, so they stop dealing with shell companies. Maybe start requiring companies show proof of insurance to cover the indemnity before they're allowed to post ads. And poof, a whole cesspool of sham entities with bad actors evaporates overnight, with almost no impact on real, legitimate advertisers. Would that slow down the current wild west of online advertising and probably hurt profits for the big ad companies? Sure. Is that a reason not to do it? I don't think so.
It’s possible that Google and FB are already doing this and are indemnified at multiple levels. Doesn’t help when a Qatari billionaire is suing them in a corrupt country with corrupt judges.
May also not prevent small ad shops from being sued frivolously to make them spend money on legal defense or settle. Although US laws are more clear and already indemnifying ad companies, while I’m sure Google and FB do whatever is required by the law and their legal teams. The Qatar billionaire is the problem, not FB or the law.