You have asked for lots of stuff maybe have a go, but a solution when you pick a pline you can get all the vertice points so can step through them and check does it have a block and does it have a number, if not add number. It is a simple task to use ssget "WP" using the vertices point to make a little box and look for a particular block.
You asked for automation so the point number would say swap 25&26 to 26 25 as you walk around the pline way to many headaches to work out always go clockwise.
I still think need a pick pick as you need to control the 1st number pline then which one is next. So pick white start number 1, then blue then green all done.
Oh yeah need a rotate vertices in list so can set point 1 it does exist, also number CW or CCW.
You should add block and number not just add block then add numbers.