OP already made it a learning moment. He told his kid it was his fault and he'd take responsibility for it. The kid also learned her parent has humility and has her back when things go wrong.
Sure, you can go the other route and have her re-write it, but I don't think that would've been as good a learning experience for the kid. "Life sucks sometimes kiddo. Sometimes you do nothing wrong and still get saddled with extra work and strife." The kid's 13. Give em a break, Red Forman.
OP definitely didn't "do the homework" for the kid based on the description of events. You are wildly exaggerating if you are suggesting typing the essay that the kid dictated is tantamount to doing the homework for them.