Only the first three of your examples are good English, and the other two are not. This works fine for the explanation of why the bad ones don't work.
The structure [ "so" + adjective + "as to" + base form ] has the same meaning as [ "so" + adjective + "that" + noun + simple past ], like this:
1 How could you be so stupid that you thought that would work?
2 My headache was not so bad that it prevented me from going to the party.
3 The box was so heavy that it was impossible to lift.
These new sentences all make perfect sense.
But when we apply the same transformation to the other two sentences, we get these new ones:
4 This problem is so easy that it was solved by a five-year-old.
5 He was so strong that he lifted that box.
You can get the feeling of what's intended, but the meaning isn't good. Those sentences should read something like:
"... that it was solvable by a five-year-old"
"... that he was able to lift that box."
So with the "so ... as to" structure, they should read:
"This problem is so easy as to be solvable by a five-year-old."
"He was so strong as to be able to lift that box.