I wouldn't but of course its up to you. I'll make my case anyway.

If it's difficult to move through the barracks, than the more desirable place to live is where you currently have the middle pop. Even if it's technically easier for the middle pop to get through the barracks, people are less likely to do whats good for greater efficiency and more likely to shorten their daily walks if they can afford to do so.

Where you have the mid pop now is much closer to their desired daily locations. Even if it started as the poor area of the city it would naturally flip over time unless their was something equally as desirable about the further area of the city.

What I would instead do is put a road between the mid pop area and the barracks, with the wooden palisade on both sides. I'd make it just big enough for a wagon to travel on either side. This would make an excellent position of defense.

I would then probably remove the gate between the barracks and the low pop area completely so that the peasants have to go through the run to get to the barracks and beyond. This makes it a little harder for the militia to be deployed to that area, but it's only the peasants after all.

You could keep the middle gate, in the mid pop section, and simply make the mid pop people move through the run briefly, or go around, to get to the barracks, or if you wanted something more exclusive you could use a little foot bridge, like when you need to cross train tracks.

Theres a lot of suggestion there. Feel free to pick and choose what you like, or ignore it completely. Considering the amount of though I just gave it, I imagine it will end up in one of my designs anyway.