Now this wasn't a judgment about swearing at a policeman - it was a decision on what the law says; that's what Appeal judges are for.
The law says:-
Harassment, alarm or distress.
(1)A person is guilty of an offence if he—(a)uses threatening, abusive or insulting words or behaviour, or disorderly behaviour, or(b)displays any writing, sign or other visible representation which is threatening, abusive or insulting, within the hearing or sight of a person likely to be caused harassment, alarm or distress thereby.
I have emphasised the key bit. In deciding whether the offence is made out the court has to decide whether a person is likely to be caused harassment and the rest. Effing and blinding in front of a party of toddlers is likely to do so. The same language in front of experienced police officers is not.
Nobody is trying to make the job of the police any harder, but the only law that matters is the law as it stands. There are plenty of potential offences involved in behaving badly to police, but S5 POA isn't one of them. The Judge's job isn't to be popular, but to clarify the law. If legislators want to come up with something to deal with the foul-mouthed yob tendency, then I imagine they will do so.