Judges face daily dilemma over insufficient places as concerns expressed that ‘feral’ gangs are committing crimes ‘without any fear of recrimination’