Hi,
Good question. In your original sentence, “He had not written a line since he arrived,” the action of arriving comes first (in simple past), and the lack of writing continues afterward.
We use “had not written” (past perfect) to show the longer or earlier time frame, and “arrived” (simple past) as the reference point.
Your version, “He didn’t write a line since he had arrived,” is not wrong, but it’s less common and sounds awkward. The original version is clearer and more natural.