The trick is to once every couple of days when it's starting to get to that point where it'll go bad soon, take it out, and re-cook it somehow to kill any bacteria. This could be tossing soup back on the stove, or microwaving veggies steaming hot.
Also, it helps a lot to have strict sanitary standards for yourself, like always using a clean, fresh utensil to scoop out your servings. Or if you use the same one, start from the most-recently cooked food and end at the oldest, so you're not potentially introducing bacteria or mold from older stuff into newer stuff.
I eat leftovers sometimes up to maybe 10 days at max, but I am pretty good at avoiding any issues from it.
Also, it helps a lot to have strict sanitary standards for yourself, like always using a clean, fresh utensil to scoop out your servings. Or if you use the same one, start from the most-recently cooked food and end at the oldest, so you're not potentially introducing bacteria or mold from older stuff into newer stuff.
I eat leftovers sometimes up to maybe 10 days at max, but I am pretty good at avoiding any issues from it.