I got myself a charging port (iPhone) adapter for headphones - just for such a use case, long flights. But can still face a problem if needing to charge while listening to music / audio book.
I use a wireless charger for this but there are also very cheap adapters that allow you to attach power on one side and headphones on the other and then connect the thing to your lightning port.