You can delete in chunks of 1000-2000 by going to All Photos, scrolling to the top (touch the time, in the status bar) swipe down 6-7 times and then press Select. Start selecting images (touch one and drag to the left or right to select multiple images) and while still holding your finger down to select, press the time in the status bar with another finger. This will cause the phone to scroll to the top, selecting all images in the process.
I was able to delete up to up 2000 pictures at time using this method; any more than that and both my iPhone X and iPad Pro 10.5 would hang - nothing would actually be deleted and I had to reboot to make it work again. Note that you'll have to repeat this process for the Recently Deleted folder, to finally remove the pictures from your device.