The general relativity states that according to Schwarzschild metrics, the "fate" of a photon in respect of a black hole depends only on the mass of the black hole and one parameter $ b $ of positive or zero value known as the impact parameter, and such that:
$$ b^2=\frac{c^2l^2}{\varepsilon^2} $$
with $ c $ speed of light in vacuum, $ l $ and $ \varepsilon $ respectively angular momentum and energy of the photon, which are invariants along its geodesic path.
Without taking into account the trivial case $ b=0 $ which means no deflection and a radial trajectory ($ l=0 $) to the event horizon, the critical value $ b_{crit} $ defined as:
$$ b_{crit}=3\sqrt{3}\frac{GM}{c^2} $$
with $ G $ gravitational constant and $ M $ mass of the black hole, leads to three possible cases, for a photon coming from infinity:
$ 1 $ - if $ b>b_{crit} $, the photon is deflected and escapes the black hole,
$ 2 $ - if $ b=b_{crit} $, the photon is deflected and moves to an unstable orbit of radius $ \frac{3GM}{c^2} $ around the black hole (photon sphere),
$ 3 $ - if $ b<b_{crit} $, the photon is deflected and enters in the event horizon of the black hole.
So the photon will escape the black hole only in case $ 1 $ which means $ b^2=\frac{c^2l^2}{\varepsilon^2}>b_{crit}^2=27\frac{G^2M^2}{c^4} $ or
$$ \frac{l^2}{\varepsilon^2}>27\frac{G^2M^2}{c^6} $$
In conclusion, the "fate" of the photon depends not only of its energy but depends on the ratio angular momentum / energy: the higher it is, the more chance the photon has of escaping the black hole.
Hoping to have answered your question,
Best regards.