From 3.8.10 there is a SQL script to remove data older than a specified date: DeletingOldDataScript.sql.
To permanently remove all audit trail interactions from the EDM database:
DELETE FROM cs_operation;
To permanently remove all audit trail interactions from the EDM database for specified group_id (i.e. a particular Customer), to fulfill a GDPR 'forget me' request:
DELETE FROM cs_operation WHERE group_id = '<group_id>';
To permanently remove all audit trail interactions from the EDM database before a certain date:
DELETE FROM cs_operation WHERE timestamp < '<timestamp up to which data should be deleted>';
To permanently remove all audit trail interactions from the EDM database before a certain date and with the specified group_id:
DELETE FROM cs_operation WHERE timestamp < '<timestamp up to which data should be deleted>' AND group_id = '<group_id>';