I don't think it's appropriate to make large modifications.
The Help Center says:
Some common reasons to edit are:
- to fix grammatical or spelling mistakes
- to clarify the meaning of a post without changing it
- to correct minor mistakes or add addendums / updates as the post ages
- to add related resources or hyperlinks
Nothing about a rewrite, which is the case here. Leaving a comment as to why the post does not meet the quality standards so OP can expand (and learn!) is better.
Also the editor can submit a full answer as well.
P.S. Back when I joined the site, I made the mistake of a one-liner answer, and the votes and comments taught me how the site works. It did not drive me away. (Example for the 10k club.)