Yeah, it should work fine. Memory is only used for active IDs. Once you delete an ID from the Trie, it uses no more memory. And the actual values of individual IDs has no (practical) bearing on the total memory footprint of the Trie itself. I dug through my data structures library and I don't have my Trie implementation there, so tonight I'll boot up my old laptop and see if I left it on that.
I'm curious, what data structure do you use to look up IDs currently?