I would avoid such massive edits as a matter of principle.
The issue is that unlike Wikipedia, content on Stack Overflow is directly attributed to a user (@Dakota here). When you edit another's user post, you are changing the tone/content of their discourse, and while the post is annotated with an "edited by", it is still expected that the author agrees with the post.
Edits such as fixing typos, grammaros, removing unnecessary greetings/thanks/... are mechanical cleanup which do not alter the content, which is fine.
On the other hand, such massive edits as this one which completely change the answer are much more questionable.
As a rule of thumb, ask yourself: will the author agree with the edit?
Unless the answer is a resounding Yes, then the edit is questionable.
This is different from: would I, as the author, agree with the edit?, you need to take into account that not everyone agrees on the same things (for example, code indentation). Thus, unless you know the author well, you need to assume it is the least agreeable one you can imagine.
In your situation?
First of all, a different answer is a new answer. Post it, and you'll even get the reputation from your hard work.
As you mentioned, there is the issue that it might be buried deep past other answers (that's an issue of sorting only by votes) and therefore be ignored in favor of the most voted (and incorrect/deprecated) answer. It's a risk. As all risks, it can be mitigated:
- you can start, non-intrusively, by posting a comment below the current top-voted answer signaling that it is incorrect/deprecated and WHY, as well as linking to your new answer; it also gives a chance to the author to fix the answer
- if there are many comments already under this answer, you can use a custom flag on any comment (or the answer) to ask a moderator to come and clean them up, so that your new comment is not lost in the noise; beware not to ask for removal of any interesting comment (such as limitations of the answer already signaled and not incorporated into the answer yet)
- last, but not least, a banner can be added to the other answers (wikipedia style) signalling it as being out of date and potentially linking to an up-to-date question/answer
The case of the banner is rather interesting: anybody using Wikipedia is used to having these banners, and know they most likely come from editors/curators rather than coming from the author, so you can include them in another person's question/answer without as many "philosophical" questions. However, do note that courtesy dictates that you should first comment (give the author a chance to react), before using the banner hammer.