I just checked
Foundations
Do NOT stop prisoners from spawning
However they do stop the jailor and nearby Npc’s.
Might wanna have someone double check to be certain.
But I put it on top And inside the cage in private world.
Prisoner keeps coming back. No Jailors tho.