What it does
Issues the token. SAP's architecture page separates the API client from the browser user: the client gets its credentials from this service and authenticates against it directly, and the client credentials grant is among the grant types the environment supports.
Remaining work
Create the service instance and its OAuth client, keep the client secret somewhere the caller can read, call the token endpoint on each run and handle expiry. The endpoint being called still validates the JWT and checks its scopes itself.