The mob cap may be the issue
Each time Minecraft attempts to spawn a mob, it will check if it is below the mob cap. Other zombies and creatures are spawning inside caves or dark places and take up the mob cap.
Try:
- rebuilding the farm above an ocean (there will be no caves) (also the easiest)
- lighting up all the caves below the farm
- afking 100 blocks above the farm, so that you only load the chunks the farm is in (160 worked best for me)
The design of the mob farm can also be an issue. Farms that rely on passive wandering (random walking around) are fairly slow (in my experience). The most efficient kinds of mob farms use some sort of water to push the mobs down.
This one works very well for me:
(might need to switch it up a little bit as it relies on QC and it doesn't work in BE)