This is slightly different from What does author order indicate?. Our group has debated when would it be appropriate for a student or a post-doc to be considered the senior ie. the corresponding author.
As an aside, for CV building purposes, would it be more beneficial to be the first author or the last author? Does it matter if one is an academic vs. in the industry?
In my field (Computer Science), I usually assume that the first author and/or the "corresponding author" is the one who "did most of the work" and the last author is the one who secured the funding to do said work. In some cases the latter does not exist (e.g., if a publication is not funded by a research grant/contract) or these are both the same person. In my opinion and experience, the author with the greatest technical contribution should be the corresponding author. This is because most inquiries to the corresponding author will be technical in nature. If I were interested in contacting the authors of a paper for a non-technical reason (e.g., an inquiry to team for a competitive proposal) and I were unfamiliar with the authors (which is unlikely), then I would do a quick Internet search to determine if any of the authors are advisors of the others and contact the most senior one in terms of academic rank.
Therefore, I think it is perfectly appropriate and even desirable for whomever provided the greatest technical contribution to be the senior author. This may vary by discipline and/or country, however.