I have been saying for years that when a team surrounds a ref en masse, all he has to do is book every single one of them. The lino, 4th official and VAR can even help ID those who need booked, That stamps it out instantly. Especially if it's a 'big' side (the Utd and Chelsea teams of old were particularly bad for this) and two or three of them get sent off as a result. Suddenly you go from 11 vs 11 to playing with only 8 men and trying your best to avoid a thumping. No club is gonna risk that.
I think I have suggested the 'traffic light system' of cards that hockey has. Green is a slap on the wrist, yellow is 5-10 mins in a sin bin (depending on the offence) and a red is **** off you're done. The rule hockey has on swearing at a ref being a red card also instantly stamps out any foul mouth abuse.
None of it is rocket science, you just need a ref with balls who will say "that's enough, you're off." The problem is they all take the abuse and the hounding and the referees association seem more interested in the exact interpretation of rule 427A section B sub clause 4, than with actually stamping **** like this out.
I do think players who roll around on the floor, hello Neymar, should just be fair game for the rest of the match. 'You roll around after virtually no contact, or none at all, suddenly no one can be booked for fouling you.' See how Neymar likes the third knee high two footed lunge, and see how often he rolls about in future.