Delete entities in batches
You can install Views Bulk Operations, create a View of those entities, and set up a delete operation. It should have configuration options to execute in batches. I have done this before to delete 100,000 records.

https://www.drupal.org/project/views_bulk_operations