Find relevant digit groupings

Brachylog, 8 bytes

ḃ₁₀₀₀↰₁ᵐ

Try it online!

The blackbox function goes on the second line (or the "Footer" on TIO) and the integer is read from STDIN. Prints true. or false. accordingly.

ḃ₁₀₀₀      Compute the base-1000 digits of the input.
     ↰₁ᵐ   Map the blackbox predicate over each digit. We don't care about the
           result of the map, but the predicate must succeed for each digit,
           otherwise the entire map fails.

APL (Dyalog), 16 13 bytes

3 bytes saved thanks to @Adám

∧/⎕¨1e3⊥⍣¯1⊢⎕

Try it online!

How?

1e3⊥⍣¯1⊢⎕ - input the number and encode in base 1000

⎕¨ - input the function and apply on each

∧/ - reduce with logical and


Jelly, 5 bytes

bȷÇ€Ạ

Try it online!

The command-line argument is the number. The line above the line this function resides in is the main line of the rest of the program, that is, the code that gets called for each of the groups. Be careful not to refer to the line bȷÇ€Ạ is in! The example used here is the 5th test case.