I think there is a subtle distinction between a framework for doing something and a framework to do something. In this sense, the word "for" implies a general purpose of something. "Hammers are for hitting things." It is not wrong to say "Hammers are to hit things," but it's unusual and and I think the "to" tends to indicate a specific purpose. "I bought a hammer to hang up that picture." So I do think "for" is a little better than "to" in your example.
As for your second example, it should be
b. We propose XXX, a novel framework for system failure detection...
without the "the". Alternatively, you could say
b'. We propose XXX, a novel framework for the detection of system failures...
The reason you leave out "the" in the first example is that "system failure detection" has not already been referred to. The reason you include "the" in the second example is hard for me to put into words, but grammatically it's like "the price of oil" or "the difficulty of explaining the use of the word 'the'".
I agree with Lambie that the best phrasing is
c. We propose XXX, a novel framework for detecting system failures...
but not everyone would agree. Example (b) above suffers from having too many nouns in a row. That is a concise way to write, and sometimes these chains help you to group concepts into chunks. But they tend to require more familiarity for the reader to quickly understand.
Example (b') has a formal air, and is more explicit about the syntactic relationships between the three nouns. It can be easier to understand, but it is wordier.
Example (c) is less formal, and (to my ear) the easiest to understand. It's also more concise than (b'). (When I say "less formal," I don't mean that it's inappropriate for formal writing. Formality is a continuum, and you don't always want to use the most formal possible phrasing even in a quite formal scientific paper.)