One approach to too many photos and not enough memory is to break the project into chunks with shared photos in each chunk. Align Photos requires the least memory so align all the photos together, or break into the fewest number of chunks needed to align. Then Align Chunks using the align by photos option. Then break the project into smaller chunks, again sharing photos between chunks, for creating the dense cloud and meshing.
This is my standard procedure when working with projects involving up to 2000 photos on a computer with 16GB of memory.