To everything: there are always three outcomes:
- Things get better
- Things stay the same
- Things get worse
Your suggestion is built on the premise that it's better for things to stay the same than it is to risk them getting worse. That's a reasonable argument, but Frank does not work this way. He does not want a status quo. He shoots for the moon and does not yield in the face of doubt, failure, or the risk of losing something in the process.
Yes, it was a gamble. Yes, Walker could've made things really bad for Frank. But Frank played to Walker's sense of righteousness. By not fighting Walker and giving him the tools to hurt Frank, Frank leads Walker to feel at ease and not needing to fight Frank any further. It gives Walker a sense of security that he's got an ace in the hole for the future, if need be.
Or, to use a cliché saying, Frank caught the fly using honey instead of vinegar.