While I don't know what metric you are using to conclude the 5C was a failure, that phone was also basically last year's phone in a new plastic shell. This phone, if rumors are true, is a smaller 6s, which is something people seem to actually be asking for.
The release time is what has me scratching my head. Not sure what to think about that.
I don't believe it was a failure at all. Anectdotally I still see a lot of them in use.
But it did improve over the iP5, having better radios, and other minor improvements. This rumor of increased battery capacity is interesting, as it suggests that the new 4" iPhone will have enhancements over the 6S in the same way, if not all of the same features (much like the 6S Plus has more features than the 6S). I fully expect the new 4" phone to be as thin as the 6S cases but in the relative 5S size, so the idea they are able to squeeze much of the 6S components into a thinner 5S-sized case, and increase the battery capacity, raises some interesting questions about how they did that. Could this new phone be an experiment in eliminating the 3.5mm headphone jack?
If this is a pre-7, especially if the 7 release is also getting moved up to the Summer as a rumor suggests, then it could be a way to get a major change like removing the headphone jack out in front of the 7 launch, so it will be old news by the time the major release comes. If the 7 stays in September, this could easily be a way to boost iPhone sales between annual refreshes. Also, considering the Retina MacBook, Watch, TV, and iPad Pro/Pencil were all major releases this year, perhaps the simple answer is that Apple simply wanted to defer their reimagining of the 4" form factor until they had more time to focus on it -- particularly now that Apple doesn't just have one size phone to update every year, but two, and now in four colors. I still think the 5c came about because Apple did not yet have the infrastructure to build two metal-cased phones, since presumably the cheapest thing to do should have been to keep selling the 5 with no changes. So the simplest answer is that they just didn't have the resources to manufacture 3 sizes of phones, and hit production yields for anticipated sales, particularly at the expense of their premium models. And no matter how you slice it, the new 4" iPhone will cost less than the flagship phones.
Also a mid-cycle refresh gives them the best of both worlds in that they can boost the specs over their current flagship phone, but the smaller display prevents cannibalization, and allows it to sell with reasonable specs adjacent to the future flagship replacement so they can still charge a premium for the privilege of carrying a smaller screen. Those who want a smaller screen are not just going to upgrade to a larger phone over price. It's hard to say from the various surveys just how large a group want to carry smaller phones, but it's likely the minority, and so will sell less and cost relatively more than the larger better selling phones.