Add author to existing arXiv paper?
I have just checked that changing authors when replacing a paper is technically enabled. I am pretty sure I have seen this happen: those with more searching savvy than I will surely turn up with actual examples.  And yes, the arxiv maintains all previous postings and their authorship.

I don't see any ethical problems with what you propose.  But I'm not sure I understand the message that you're seeking to convey: are you saying that you attach some meaning to an initial posting by your student only followed by a replacement jointly authored with you?  To me that does not have a clear meaning (and by the way, some people will look at the first posting and many won't).  If anything, that would look to me like you realized that what your student uploaded was not satisfactory, so you stepped in to salvage the situation.  If that's not what you're going for, maybe don't do this.  Why not just upload a jointly authored posting the first time around?