My guess on what happened at God Valley:
We know Rocks D. Xebec had many similarities to Blackbeard, and Blackbeard's main ship is even called the "Saber of Xebec". Rocks was likely the previous user of the Yami Yami no Mi and may have had the same master plan as Blackbeard to some extent or another, not that he would've told anybody before he died. This could mean he got the Immortality Surgery done on him via someone else using the Ope Ope no Mi, prior to his attack on God Valley, but his crew wouldn't have known what his true plan is or that he had made himself immortal. They would just have known about what he said he planned to do at God Valley, which was to kill the World Nobles there along with their slaves and then take all the treasure they have. Whitebeard may have had the Gura Gura no Mi already at this time while he was in Rocks' crew. Whitebeard presumably joined because he thought it was just fine to kill many of the World Nobles slaves along with said Nobles. It would do major damage to the WG and also get a lot of treasure. And Whitebeard could definitely have decided that those slaves were just going to live as slaves their whole lives anyways, and hesitating to majorly damage the WG because of that could have seemed stupid or naive to him. He cared about his Nakama a lot but he is still a pirate, there are situations where he'd have been willing to kill people who have no relation to his crew. If anything, he may have been more ruthless in the past when he was part of Rocks' crew and was OK with World Conquest as long as it meant ousting the WG, but the ensuing incident at God Valley could have made a major impact on his personality and why he cared so much about his crew being like a family and never betraying their Nakama.
During the fight against Roger and Garp, Rocks' true intentions were revealed in some way to be different than what he told his crew. Perhaps Roger revealed to everyone in Rocks' crew that there is some sort of superweapon on God Valley that Rocks didn't tell anyone about, and as a result they discovered that he obviously planned to betray them and kill them off with said superweapon. At least, he would have tried to kill all members of his crew who were not in on the master plan already, including Whitebeard, Kaido, and Big Mom. Specifically Whitebeard and Big Mom as they were the biggest threats at the time. That way he can get rid of two of the most powerful pirates in the way of him and his world domination plans, since he knows they would refuse to work for him if they ever figured out he planned to be an immortal ruler of the world after ousting the WG. He may also have planned to steal one or both of their DFs if he did indeed know how to do so and had a plan similar to Blackbeard's with the Yami Yami no Mi. At the very least he would want the Quake Quake no Mi for sure if he knew how to steal DFs and had Blackbeard's style of plan, and assassinating Whitebeard could have been his intended way of setting the stage to wipe out all the others not in on his plan with Quake Quake powers.
I do think it's slightly more likely though that Rocks didn't have the same plan as Blackbeard, even if he intended to betray his crew. That way Blackbeard is more unique in being the first person to think of eating hearts and stealing people's DFs with the yami yami no mi. Rocks might've just intended to disable WB's powers with his Yami Yami no Mi and have a few other traitors in his crew shoot WB to death, and subsequently attempt to do the same to Big Mom. Rather than getting multiple DFs his plan may have been to steal some super weapon from God Valley and use that on top of his Yami Yami no Mi and the members of his crew who he manipulated to go take over the world after Big Mom, Kaido, Garp, and Roger are all dead. If he did have the same plan though of stealing DFs, in all likelihood nobody ever found out because he never successfully got to steal one, and Blackbeard independently came to the same conclusion on his own when he made his plan of stealing DFs with the Yami Yami no Mi.
What I'm more sure of though is that Kaido probably ended up taking a mortal injury sometime during the battle, either from Garp or Roger or Rocks himself. Big Mom then killed Rocks with her Soru Soru no Mi's lifespan drain at an opportune moment, and was surprised to find out that he had an infinite lifespan granted by the Ope Ope no Mi. Acting quickly, Big Mom used her lifespan transfer powers to transfer said immortality over to Kaido and revive him from a near-death state. This would then explain why Kaido is unable to commit suicide and also why he owes Big Mom.
I realize it could also be Kaido's DF which makes him unable to die, but it doesn't necessarily do everything. It could be that his DF is what makes him invincible to all attacks, but immortality in combination with that invincibility makes him truly unable to die, even if the Marines attempt to starve him to death in prison and even if he attempts to starve himself for suicide purposes and so on.To me it makes slightly more sense if Kaido's undying nature comes at least in part from the Ope Ope no Mi. He doesn't seem like the type who would try to obtain the Ope Ope no Mi's immortality powers voluntarily like Doffy or Blackbeard, and given his death wish, I think some kind of involuntary immortality granted to him during that battle in combination with his nearly invincible body could explain why Kaido became unable to kill himself even after going through whatever incident it was that made him become suicidal. Another possibility is that his Haki grants him the ability to survive without food for even years in a row, and this has been shown before with some Admirals apparently being able to go without food for years. I just doubt it is the case unless he has lost control over his Haki to some extent and can't stop it from keeping him alive. Maybe his DF could cause him to lose control of his Haki in some way, but it still seems like a stretch to me if that is the reason. Overall I think him having immortality due to the Ope Ope no Mi in an indirect fashion via lifespan transfer/theft done by Big Mom is the most likely option and potentially explains a whole lot of things.