At least on Mastodon, any instance stores IP, so....
You can target a list of suspected spammer IPs, though that's often a losing game of cat and mouse where you end up missing some spammers and catching legitimate users in the crossfire.
For Mastodon, all of this is manual, so it will be up to moderators on the server....
Personally I see that as a very serious problem. Its one thing if it can be proven that legal counsel knowingly breaks the law. Its entirely different if the lawyer simply disagrees with the judge. Judges shouldn't be able to threaten counsel with jail time of seizure of assets simply because the judge disagrees with the legal argument a client wishes to make.
But Brazil justice is already in contact with then, as long as they offer a place for justice to send court orders and comply with then, as they have done so far, they wont have any problems..