I can't understand the logic of what you are trying to do.
A CC (Controller change message) is used to set various parameters in MIDI system, which will then get actioned if the MIDI system is paying attention to that message and implements them. A lot of these messages come in pairs, the first time they are encountered in the list it is the most significant part (or bit) of the message. The second time (32 messages later ) you get the least significant bit of the number. All CC values go from 0 to 127.
Now what is a pot going to do with this list? That's what I don't understand. Is it constantly sending CC messages to your system? If so at what rate? You are in danger of crippling your entire system by flooding it with messages.
When the button is pressed what exactly do you want to happen? You say it will change the CC message, but change it to what?
Note that CC numbers 120 to 127 are used for Channel Message Mode messages. Things like all sounds off, all notes off, reset all controllers and so on.
I found the phrase "32 messages later" to be confusing at first — I thought it referred to later in time, meaning that there were 31 intervening MIDI messages between the two parts. It's actually referring to the controller number offset in the MIDI spec: the second part of a high-resolution (14-bit) CC message lives at controller number X + 32 — not literally 32 messages later in the data stream.
I also learned that many systems only use the first (MSB) part and ignore the LSB entirely, so the second part is often not sent at all.
Just sharing in case others found that phrasing a bit opaque — it makes sense once you know the structure, but it tripped me up at first.