"copy to tmp table" for 24 hours, then timeout; when ALTERing to add PK & AI
Well, there's nothing to be done at this stage. You can't terminate the process (rather, you shouldn't) while running. You cannot modify major memory settings without restarting MySQL.

I, for one, am not enthusiast about loading all table data then loading indexes. However, doing this for the PRIMARY KEY is plain wrong. The advice you read related to secondary indexes. With adding a PRIMARY KEY InnoDB will rebuild your entire table all over again; so I'm afraid your entire first load step was redundant.

Nevertheless 7 hours for PK compared to 30 seconds for secondary index does not make sense. What is your innodb_buffer_pool_size? Which disks? RAID? Which file system?