I solve these very problems in the API stack. I cannot speak to raw performance at scale if that's you're thing, though I have long since solved the feature logic lifecycle, and it does not (generally) need this.
I would use UUID related stored procedures, for converting between forms, allowing binary IDs, uuid-form, and base32. Utilities I get. Logic override and transformation I do not. If it came to that, it's a legacy hack or you're doing it wrong.