There are two ways to lead by example in this situation. One is to walk away. The other is to breed change. Don't discredit the latter.
On the other hand, most often than not, you'll be tilting at windmills.
You have to recognize when you have a real chance, and not fight a losing cause. I guess the standard advice works in this case as well: fail fast :)
I've ignored my own advice and am stuck on a company with a toxic IT department, I tried for years to change it, but upper management is not interested and the IT managers were clueless and only interested in keeping their jobs.
As long as anyone but you holds the gold, it's much harder to engender change. Putting them out of business, on the other hand, has the awesome side effect of getting one rich while doing the right thing.