If not, what other idioms could be used to express that one is thinking?
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
I'm not sure if this will be widely understood. It's likely to be confused with to grind someone's gears, which means
To greatly or specifically irritate or annoy someone
An alternative is to rack one's brain(s):
to think very hard, usually in order to remember something or to find a solution to a problem
(sources: The Free Dictionary)