[Disclosure: I work at CoSign]
What you're describing is done, securely, by our customers all the time (using open, standard, PKI digital signatures).
Digital Signature signing is usually done on a "Secure Signature Creation Device (SSCD)". This is often a smart card but does not have to be. One important alternative is a secure centralized system. That's what CoSign and some other companies sell.
How it works: software that you, CoSign or someone else writes takes the documents from the ERP system and computes the doc's digital signature hash. The hash is sent, with authentication information for the signer, to the centralized SSCD. The SSCD then computes the digital signature and the result is sent back to the requesting system. The signature is then added to the document per the standard (eg pdf). Result: a signed pdf file. (Or signed Word doc, or signed XML etc.)
Note that the signer's private key never leaves the SSCD. CoSign has a SSCD model that includes a FIPS certified tamper-proof case. If anyone opens the case, all of the private keys are immediately destroyed. See description.
For integrating with your ERP system, we have pre-built connectors and multiple APIs.
For more info, contact sales at arx.com. Tell them Larry sent you.