Whatever rules you attempt to come up with, the lawyers will nitpick them to death and find some way to keep junk patents alive. For years, everyone in the legal profession looked forward to the CLS Bank v. Alice case at the Supreme Court as the Final Word on software patents. That was 2014.
My article:
https://albertcory50.substack.com/p/lets-vote-on-it
lists some of the patents that have been upheld since CLS Bank.