Agreed to a degree. The Joker didn't won, but that doesn't mean that the Batman triumphed either. The sacrifice Bruce made prevented the Joker from winning. People didn't lose hope, the criminals weren't set loose. He actually won. But Batman paid the price and had consequences.

He corrupted Harvey. The peace Batman and Gordon built was founded on a lie.

In that way, the Joker did win.

When Bruce is in the pit, he even has a nightmare of Ra's taunting him about that very thing. It's clearly been bothering him to hell.