I've also been having this issue. I don't think mob numbers matter, just that while being crushed or contained they get trapped in the block and sticky piston causing the server to crash. I done a few tests with numbers and other varients but it would always inevitably crash.
I'm having the same issue.
The redstone on Realms doesn't work the same as on the console edition. I'm guessing that book was for the console edition therefore won't work on realms