The proper way to do things would be to get both the mailbox and folder's ids, as "Calendar" is only valid for users with language preference set to English. So something like this:
$calendars = Get-Mailbox -RecipientTypeDetails UserMailbox | Get-MailboxFolderStatistics -FolderScope Calendar | ? {$_.FolderType -eq "Calendar"} | select @{n="Identity"; e={$_.Identity.ToString().Replace("\",":\")}}
$calendars | % {Add-MailboxFolderPermission -Identity $_.Identity -User XXXX -AccessRights Editor}
You can provide a (mail-enabled) security group for the User value. Also double-check the permissions you'd want added, as EditAllItems does not allow you to create new items.