Thanks I wasn’t sure if it was possible to manipulate the dock like that without some kind of special permissions like are needed for menu bar customization (accessibility, screen recording, etc). These days I just don't use apps that require those unless they're extremely well known/trusted (and even then...)
This looks like it’s potentially great for my use case. I currently have spacers to separate groups of apps in my dock, but many of those apps I only use in specific situations (things like a bunch of IDEs I don't need when I'm not programming).
I'm going to give this a shot. Thanks.