I have 4 pairs in a 3ft tank.
Its plenty of space for them to avoid each other,
So that kind of gives you an idea for yourself.
If I were you tho, when a pair breeds, you should put the cave in its own tank, or: in a divided off area of your tank, then when the babies become wrigglers, just take them from him, or leave them in that seperated area.
Then put the male back in the main area, he might then get a chance to eat, and the female will be ready again to breed.
And youve kept the wrigglers in a area, so they arent hard to catch or keep healthy etc.