zero conditional and when

Hi everyone,
I’ve got a question connected with the zero conditional. Is the sentence correct? Does it have a sense?
After that I do my homework. When I do my homework, I take a rest.
the sentence means that doing homework helps me relax. Am I right?
In my opinion there should be When I finish my homework/have finished/ have done
I want to underline that the action happens regularly and is completed at the same time.

After that I do my homework.
is correct, but requires context and refers to what has come immediately before it. Usually you would find that within the same extended sentence.
When I get home I have a cup of tea and after that I do my homework.
An optional comma after ‘that’ would help clarify matters, especially in the original shorter sentence:
After that, I do my homework.

When I do my homework, I take a rest.
would mean that you relax while doing homework, which doesn’t make a great deal of sense.
I suggest:
When I’ve done my homework, I take a rest.
This indicates that you do your homework and that is followed by a period of rest. It does not indicate that it is completed at the same time.

Thanks for zour answer.
What about finish?

You can substitute ‘finished’ or ‘completed’ for ‘done’ with the same meaning as above.
When I’ve finished my homework, I take a rest.
When I’ve completed my homework, I take a rest.