Is it possible to configure the OOTB Approval workflow through an
API?

I basically want to customize the Approval workflow without going
through the Association form.

For example, I would like to programmatically associate the Approval
workflow with document library A, select a parallel workflow, choose
which groups are inserted into the workflow, etc.

Please don't tell me that I have to build a custom workflow just to
use the same workflow through the API.