- Install the excellent Ninja Forms plugin.
- Add the example code to a functions plugin or into your WordPress theme's functions.php file.
- Set up a form to capture waiting list interest.
- When the event is sold out, the form will automatically appear on the event page.
There's more information in the Event Espresso wiki:
https://eventespresso.com/wiki/using-ninja-forms-to-create-wait-lists-for-your-events/