In a world where multiple retention policies might be in place for mailboxes, inactive mailboxes are often in a soft-deleted state but not removed when expected (discussed in https://practical365.com/remove-inactive-mailbox/). This means that it is sometimes possible to retrieve folder ids from inactive mailboxes:
[array]$InactiveMailboxes = get-exomailbox -InactiveMailboxOnly
$InactiveMailboxes.count
57
$Mbx = $InactiveMailboxes[15]
Get-EXOMailboxFolderStatistics -Identity $Mbx.distinguishedName -IncludeSoftDeletedRecipients | sort itemsinfolder -desc | ft name, itemsinfolder, folderid
Name ItemsInFolder FolderId
---- ------------- --------
Inbox 5508 LgAAAADj8u1/g9BJR7or4yVe1bjlAQBjB+G9FlKoTbFkTLBqgP2UAAAAAAEMAAAB
DiscoveryHolds 3956 LgAAAADj8u1/g9BJR7or4yVe1bjlAQBjB+G9FlKoTbFkTLBqgP2UAABelNdzAAAB
PersonMetadata 194 LgAAAADj8u1/g9BJR7or4yVe1bjlAQBjB+G9FlKoTbFkTLBqgP2UAAHzoNrmAAAD
Recipient Cache 141 LgAAAADj8u1/g9BJR7or4yVe1bjlAQBjB+G9FlKoTbFkTLBqgP2UAAAAAAEgAAAD
Sent Items 93 LgAAAADj8u1/g9BJR7or4yVe1bjlAQBjB+G9FlKoTbFkTLBqgP2UAAAAAAEJAAAB
Just in case this helps someone...