I'm working on a new first boot sequence for our org; in the past, I've used dockutil and duti to set the appropriate dock and UTI's for calendars/email. They're both getting long in the tooth, though, and I seem to recall there was a Swift app out there to do the same thing as dockutil. Could anyone remind me what the name of the dockutil replacement was, or suggest more modern replacements?
Take a look at Docklib / Outset3 / Macadmins-Python3...
Works great and easy to setup. Uses a localized version of Python3 so will work on macOS 12.3 and beyond.