Thanks for all of the input guys. In the end, it was just the fuel pump.
One nice thing about replacing it is that the slight hesitation around 3500rpm under hard acceleration seems to be gone. That may have been a sign that it was on its way out.
I'll also be doing my fuel filter soon, as the car has 162K km on it and it was last replaced at 100K km.