First, you are not proposing testing with oxygen, you are talking about AIR which is around 20% oxygen. Second, what is your ignition source? If you had 5,000 psig upstream of a shut valve and zero psig downstream and you slammed open the block valve, you could compress the trapped air fast enough to develop very high heat of compression numbers, BUT the mass of air that is trapped in a single valve is too small to be a problem--by the time the pressure wave hit the backside of the valve and mixing began, the incoming air would quench the heat to nearly supply temperature.
If you ganged 10 30-inch valves for a test, you might have enough trapped air to ignite a fuel source, but then you have to determine the autoignition temperature of any oils or greases and again it becomes a tempest in a teapot.
Finally, slamming that valve open would be a really stupid thing to do. As the Engineer, you have an obligation to write the pressurization/depressurization procedures that must include a rate of pressure change. If you take 3-4 minutes to get to 5,000 psig, you'll never get a supply stream that can act as a piston (I call this a pseudo-piston in my purging class) and you won't have an ignition source at all. You want to be even more careful with your rate of depressurization. If you go too fast you'll develop a lot of JT cooling and can easily drop the valve to the brittle fracture region while you still have enough pressure to break something.
David