Given this statement of yours:
I'm not confident that I can reliably sanitize a retrieved WHERE clause.
The answer to the following question is "yes."
Is it fundamentally a bad approach to save arbitrary code to a database, even if access to that table is restricted to a small number of users?
Don't rely on restrictive access privileges. An attacker can cause mischief (at least denial of service) using only SELECT privilege -- or even no privilege at all.
I agree with the comment from @WayneConrad, that you would be more secure if you design your business logic in a DSL, and then write code to interpret your own DSL and convert it into a limited set of WHERE clauses. By parsing and validating your own DSL, you have a greater likelihood of blocking malicious code (unless your DSL becomes too flexible).
You're going to have to write a parser and validator, either for SQL or for a DSL. There's no other way to do this with any kind of security.