He literally lost the ability to use haki because he lost the ambition that Haki IS. It's not Ki, it's not Chakra, it's not some autonomous spiritual force, it's literally the concept of ambition and will made physical, which means you need to have a dream in your heart for it to work at all.
Crocodile was the main antagonist of the Alabasta saga and among Luffy's most iconic enemies. Although the former warlord did not have access to Haki, his versatile Devil Fruit compensated in many other ways that made him a threat to be remembered.
Cobra attacks Luffy but Luffy squirts out water from his mouth and douses Crocodile with water, just as he planned, making the Warlord susceptible to Luffy's physical attacks. Luffy uses his Gomu Gomu no Bazooka technique and hits Crocodile directly to his stomach which sends him crashing.
Luffy actually used Haki against Enel and Crocodile.
With that said, Moria lacks motivation and can be a very lazy fighter. Crocodile is physically gifted and can avoid Moria's attacks on pure reflex alone. He also has access to poison abilities via his left hook. Ultimately, Moria wouldn't have the antidote to survive this deadly technique.
Out of all the 7 Warlords that fans have been introduced to so far, Buggy remains the weakest. He isn't particularly good at anything, and his Devil Fruit isn't all that impressive either. Buggy's biggest strength so far is being in the right place at the right time, and accidentally rising to power.
9 Enel: Goro Goro No Mi
Enel could effectively shatter Crocodile after a concentrated lightning strike. Neither Enel nor Crocodile have used Armament Haki, but with such a stark contrast in strengths, Enel wouldn't need it to defeat the would-be tyrant.
He is a specialist of Observation Haki, Ryuo, and also Conqueror's Haki. Among all the Haki types, however, Luffy is especially skilled at using Conqueror's Haki, which is his best Haki type. In Wano Country, he reached Yonko level and is currently fighting Kaido in a one-on-one battle.
Busoshoku is perhaps Luffy's most used Haki as he commonly mixes it with his Devil Fruit abilities to increase his offensive and defensive potential.
3 Weakest: Crocodile
Although Crocodile had got a lot stronger when he reappeared after his time at Impel Down, he was rather weak as Shichibukai when put up against the likes of Doflamingo, Mihawk, and Hancock.
Luffy is confirmed to have overcome his weakness of shrinking when deactivating this Gear, after inflating both his arms and using "Gomu Gomu no Elephant Gatling" on Noah for a prolonged period of time and not turning into his chibi form.
Monkey D. Luffy has developed an extremely high resistance (if not quasi-immunity) to most poison. Primarily due to his near-death experience against Magellan's poisonous Devil Fruit, his body started producing antitoxins (antibodies) to neutralize future poisons and foreign toxins without issue.
Luffy's first proper defeat in One Piece came at the hands of Smoker, who served as a Marine Captain back during the Logue Town arc. Being a Logia type made of smoke, it was impossible for Luffy to beat Smoker.
7 Armament Haki
Armament Haki is a power that Dragon most certainly possesses. Although not everyone in the story has Armament Haki, it is impossible for someone of Dragon's stature to not be a great user of this ability.
Nico Robin is the archaeologist of the Straw Hat Pirates and one of the crew's strongest fighters. While Robin should've been an Observation or Armament Haki user, given that she spent quite a lot of time around those who wield it during the timeskip, she doesn't equip this skill.
In fact, Nami has already demonstrated abilities similar to Haki. During the Alabasta Saga, she has shown the ability to tell even the slightest of changes in weather which, according to Vivi, is beyond human comprehension.
Conqueror's Haki is one of the rarest powers to exist in the One Piece world. Unlike the other two Haki forms, this power isn't accessible by everyone but exists within only a chosen few. Its basic level allows the user to intimidate and overwhelm those who have weaker wills.
Roger was the epitome of the greatest Haki user as he possessed all three major Hakis known in the world of One Piece. He was the captain of the famous Roger pirates, which consisted of powerful people like Rayleigh, Shanks, Buggy, and many others.
Garp possesses Haoshoku Haki, which is the rarest form of Haki for those who holds the qualities of a "King". He once remarked on how Luffy inherited it at Marineford. More than most, he has mastered it to the fullest, being able to perform feats beyond knocking out weaker-willed opponents.
However, physical blows without Haki don't work on him due to his rubber body, and the only slashing-style ninjutsu Sakura is shown to know is a scalpel-like blade. With that being her only weapon to hurt Luffy with, it's likely she will lose this fight in embarrassing fashion.
Monkey D. Luffy has mastered all three types of haki, including Kenbunshoku Haki (Observation Haki), Busoshoku Haki (Armament Haki), and Haoshoku Haki (Conqueror's Haki). He can even use several subforms of the hakis, which makes him one of the most powerful haki users in the One Piece world.
The truth is that Zoro would probably low diff him, with mid diff being a generous scenario for Crocodile. Zoro has much better physical showings and can use all 3 types of haki, while we don't know if Crocodile can use it (although he probably can). He doesn't need any help from Mihawk to win this.
Jaguar A fully matured jaguar may capture any crocodilian, regardless of species, such as the Nile or Orinoco croc, or any other Cayman, including the black Cayman, if their head fits in its mouth and it can crush their skull with a single lethal bite.
Crocodile is a formidable opponent, given his mastery of the Suna Suna no Mi. However, he is currently at a disadvantage against Zoro. For some reason, Crocodile has yet to demonstrate any usage of Haki techniques. This is a basic necessity among the strongest One Piece characters.