That is irrelevant, we don't need to be able to tell them apart, the membrane needs to be able to. Besides that, they can be completely identical.
> I'm confused because on one hand I can see that it requires work to reorder the particles once they have been shuffled around. On the other hand I don't see how one could extract work while they get shuffled around if they all have the same momenta.
In the illustration with the cylinder from Wikipedia you can see that the level of the one fluid (which the other fluid is selected into) rises. It performs work against gravity and builds up potential energy / increases the pressure. You can harvest that.
> The former scenario is famously the setting for Maxwell's daemon. I was assuming this scenario is something else.
In Maxwell's daemon you start with a substance which is already mixed and separate it into its components. That requires work and is the exact opposite of what is happening here. In fact it is called reverse Osmosis [0]. Osmosis gives you pressure which you can harvest, so reverse osmosis needs pressure back to operate. That completes the cycle.