I've never come across any actual research in this area, not of the sort you are looking for. There's a general belief that marking more than a few errors will discourage creativity, along with the problem that it will discourage children from using more adventurous vocabulary in their writing, but how much actual evidence there is for this idea I don't know.
It's also true that as (some) children grow older and read more widely, their spelling tends to correct itself, to a surprising degree. This was the case with both my girls; however, I did emphasise the phonic nature of spelling at home, and reinforced it whenever they asked me how to spell something, by making them sound out the spelling for themselves. But it's obvious that this doesn't work for all children, as some still end up with very bad spelling, punctuation etc.
There's also the issue of children 'knowing' theoretically that, for example, sentences should start with capital letters, but just not doing it in their written work. This could be due to working memory problems, in that they are concentrating so much on what they are trying to say that they don't pay attention to anything else. On the other hand, when such errors aren't pointed out, and children aren't required to correct them, it does rather send the message that those mistakes don't really matter, and so pupils don't need to make the effort to get it right.
One thing that probably isn't helpful is teachers writing the correct version in for the child: it's the child that needs to make the effort to correct their errors, not the teacher, if they are going to learn from their mistakes. Sorry, this probably isn't very helpful!