Interesting thought and depending on time period and culture I can imagine that. But this is not how city walls were described in classic greek text? (Case in point: Sparta, famously the only greek city without city walls, had tons of slaves) or how cities worked in medieval age (where "city air" freed you from serfdom).
https://en.wikipedia.org/wiki/Stadtluft_macht_frei
Also walls build on defensive terrain (hills) point to protection as its usage. There is the case that walls are useful to tax trade because you can funnel wares only through a gate which doubles as a custom house.
Didn't the Helots live outside the city of Sparta, and mainly worked the fields?
As an aside, the Spartans famously claimed that they were their wall. But I wonder: Spartan construction was very simple, and they despised those with expertise or a craft (the small class of free noncitizens who along with the helots did all productive work). Maybe the truth is that a project with the scope & complexity of a good city wall was simply beyond them. They couldn’t do it, so they told themselves a sour grapes story about how they never wanted a wall to begin with. Just a hunch but I like it.
He also wrote a well known book on the subject: 'against the grain', where this argument is put forth. Wikipedia has a summary of the book: https://en.wikipedia.org/wiki/Against_the_Grain:_A_Deep_Hist...
There are examples of large scale public engineering works with and without observable central authority throughout archaeological record around the globe. So just "having walls" is not sufficient implication of central authority attempting to control the population.
IMO in the specific example of Against the grain the central authority thesis is pretty solidly framed. But, it does not aim to be a generalizable theory, nor IMO should it be viewed as such.
Now it is hard to argue for or against the application of any rule, there are exceptions to rules. However here you would also need to give some argument, as to why this kind of reasoning could not be applied to this case.
So the city wall were also planned and built in a decentralized fashion, all by the community?
James C Scott used to say, that city walls were all designed to keep their own people from running away, sort of like the Berlin Wall, see: https://www.youtube.com/watch?v=u2ukte-je8k