If you're talking about such large amounts of data, it's better to delete in batches. You can do this by doing a Custom retrieve with which you always retrieve the data in batches and then delete that part, repeating this until you have deleted the amount of data you want. https://docs.mendix.com/refguide/retrieve
To maintain this from now on I would also create a Scheduled event that removes audit trail objects every night that are older than date X for example.