He could donate money for the campaigns of good government officials.
Like Harvey Dent, who became Two-Face?
He could’ve opened a string a mental health facilities because Gotham has a major mental health problem.
Harley Quinn's origin story is that she was Joker's psychiatrist.
IMO: In the real world Joker and the rest of most heroes rogues galleries would have 100% been either sentenced to death (Which while it doesn't currently exist in Gotham which is in New Jersey, would likely be put into effect considering waves hands broadly at the various levels of shit that has gone down in Gotham over the years.) or murdered by a cop who said they "lunged for his gun". Superman would be a transitional energy source, we'd be living in luxury gay space communism owing to the innumerable genius level intellects (Atom, Mr. Terrific, Brainiac 5, Blue Beetle, the list goes on.) fixing basically every issue, which makes for a great reality but a really boring comic book universe.