I still think Rugby Union has it nailed on; any lip or questioning of the ref's authority when the ball is out of play and it's a 10-yard move towards your own goal.
What I also think rugby does much better than football is the ref's explain their decision to the players. You might not agree with it but at least you know why and can learn the way they are going to referee the game. It also show mutual respect.
Some football refs are good at this but all too often the ref has a power trip and either runs away or tells the players to go away. Should be agreed that the captain and the person penalised get the explanation and a very quick opportunity to put their side over. I dont think it would slow the game too much and have so many knock on benefits.
There is also the factor that rugby is a slower game with them all hugging each other on the floor so the ref's are usually right next to the play and giving instructions before penalising if they persist.