Improvement #2
You are going to have another problem eventually (possibly already have, if you're getting faults about indirect addressing).
You are (inadvertantly) storing the entire history of every part ever made.
The first one is at N11:0. The second at N11:1. etc. Eventually, you will have made 255 parts, and exceed N11:255 (the limit of the file), and the processor will fault.
Another approach: Instead of using a counter (C5:11) to point to the unload location, shift the entire data table down by one instead.
The code for that (two branches):
COP #N11:1 #N11:0 128
SUB C5:4.ACC 1 C5:4.ACC
Put this (with a oneshot before it) in place of the Counter for C5:11.
By doing this, the value in C5:4.ACC will have the number of parts between PE2 and PE3. Then, N11:0 will always contain the value of the part AT PE3. Therefore, you would change your indirect address N11:[C5:11.ACC] to a simpler N11:0.
You'll also have to answer a question (and one which may be giving you some grief right now): Whether or not to reset C5:4.
If you do reset it, then you had better make sure that there are no parts on the line when you start up, otherwise you are going to be out of synch (and possibly put a negative value in the counter, although this can be coded around. In fact, such coding could be used to help synchronize the system, if parts run past PE3 without first being seen by PE2).
If you don't reset it, then you had better make sure that no one ever removes parts from the line, even when there's trouble, or you will be out of synch.