In my experience writing papers, the methods and results are the easiest things to write (sometimes choosing what to include in the results is challenging, but the actual writing of it is not). The introduction is usually written as part of the justification for doing the project, but the discussion can be quite challenging, especially if it's been a while since you did your literature search. And you have to have a good handle on the results in order to write the discussion. So I'd also say the person that does the synthesis of the information, all things considered, probably does more work with writing the manuscript.
That said, OP, you did a lot of work. I don't think asking for co-first author is unreasonable, but I'll also say that second author is not a bad position for you. You're still early in training and will have more opportunities to get involved in projects where you can be first author, and this may help you with that to some degree. And, more importantly, you will be able to talk extensively about this project on residency interviews. That carries more weight than someone else who has a middle (or even first) authorship who can't actually explain their project.
And in general, authorship is something that should be discussed early. I have a second author paper that I probably did just as much work as the first author, but the first author came up with the idea originally and wrote initial drafts of the manuscript... this despite me having a better understanding of the background because it is in my area of expertise. I'm also maybe being put as last author on another paper using data I collected and analyzed for that project because our senior author is writing the manuscript and claiming first authorship. On another project during my fellowship, me and another fellow did the same amount of data collection, but I did data analysis (along with our statistician) and wrote the bulk of the manuscript, so I claimed first author (I was originally going to let the other fellow have it, but they were being quite slow with the writing and then something came up that they had to step back from the project for a bit). That project stemmed a project for another fellow, who is going to be first author on her manuscript and I'll be put somewhere in the middle. She also has a student working on her project doing data collection, but that student does not understand the intricacies of the project.
Bottom line: you're getting a publication. If you don't get co-first author, it's not the end of the world, you still have something to put on your residency application and will be able to talk about the project *in detail* during interviews.