Automate the creation of service accounts?

Use either the CLI - Manage Users, Groups, and Roles | Couchbase Docs
or the REST API - Manage Users, Groups, and Roles | Couchbase Docs

see - Users backup and restore - #2 by tmac