In this case, Johannes is not looking for “the” school, indicating a specific school they are talking about but for a generic school. Which means that should be preceded by an indefinite article. So the use of kein.
But let’s say they were talking about the type of school? Mittelschule, Hauptschule…
Could it be in this case an answer like… nicht die Hauptschule aber die Mittelschule.
I agree with what you’re saying. OP’s change makes it refer to a “specific” (THE) school which is an important change which to me changes the entire meaning. I’ll wait for experts too, but I wonder if he could use “any” instead of “the”. i.e. “No, Johannes doesn’t visit “ANY” school”… I’m not sure what the construct would be exactly so I won’t try. I think the preferred way is the original version.
Hm, I don’t get the question, I think.
In answer to the previous sentence Besucht Johannis eine Hauptschule? the answer would be Nein, Johannes besucht keine Hauptschule because keine is the negation of eine.
But in a general text (without the previous question) there are e few ways to say the sentence with (mostly) the same meaning.
Then your sentence would be right (together with the next part of the sentence).