How to bring up all factors recursively except a particular term?

I want to write a function

keepOnly[expr_, keep_]

Such that

keepOnly[f[f2*g[g2*h[h2*keep, h1], g1], f1], keep]

becomes

f2 * h2 * g1 * f[g[h[keep, h1], g1], f1]

In other words, we eliminate all the factors except the term keep.