It would be brilliant if a repeating group could be collapsed!
The way I got around this is put the repeating group inside it’s own Group and set this to collapse when hidden. You can set a condition on the group to say if the repeating group has x data then show Group. Works well, but make sure you organise your group names as it can get messy!