Yubi makes an 'actual' HSM product:

* https://www.yubico.com/products/hardware-security-module/

See also perhaps less expensive option:

* https://shop.nitrokey.com/shop/nkhs2-nitrokey-hsm-2-7

I am planning on fiddling with using the TPM of an old dell 5820 I've got floating around my house as a budget HSM.

It looks possible, on paper, if you don't poke at it too often.