Even if, a biiiiig if, Rayleigh kept training all these years and kept the same motivation (will) as he did when he was sailing with Roger and openly defying the WG and the Marine, even with that he is 80 years old bro...at 80 years old, Rayleigh was 100times stronger than Sabaody Luffy who was numerous times stronger than Alabasta Luffy who defeated Croc.
Doesn t matter if Crocodile got his dream crushed, he still lost to freaking Alabasta pre-haki pre-gears Luffy while actively pursuing his goal.
I know it's all about will as mentionned numerous times through the manga but no amount of will would have allowed Luffy to beat 80 ueats old Rayleigh...