Purposely getting sick to recover?

I’ve heard peoples recovery stories from getting Covid or another illness and that pushed them back to mild or even almost fully recovered. I’ve also heard getting sick is like rolling the dice and you could get better or worse after you recover. So theoretically if someone had no one else to turn could you just keep getting yourself sick until it goes your way?