A nice big "this answer is outdated, see [other answer]" note does wonders.
This is particularly distressing in the case of security vulnerabilities. Vulnerable code being copied from Stack Overflow into consumer applications isn't hypothetical, it's been empirically demonstrated (https://www.aisec.fraunhofer.de/en/stackoverflow.html), yet the community and company refuse to accept responsibility and address the problem. (Of course the developer creating the application is more responsible, but Stack Overflow is in a position where they could help protect innocent end users and the common good.)
Pinning of accepted answers to the top of the list was a good idea when the site was young. These days, it prevents updated better answers from taking the place of ten-year-old misinformation.