There should be a table to convert flange class rating to psig, and this is different for different material. As i remember, for SS316, flange class 150 should be around 300 to 400 psig (I don't remember the exact value, I can try to check it out) and this is much lower than your valve body rating.
my opinion is that, you may double check on your system requirement, and see whether do you really need 5000psig, if you need 5000psig, then i suggest you change your flange class to higher class, may be class 2500, or may be you can change to a NPT thread, an 1" female NPT thread will have rating to 4400psig for SS316.
Another option is may be you can use a double ferrule compression end connection by using a SS tubing, an 1" OD SS316L tubing with 0.12" wall thickness can stand up to 4700psig. fitting like Swagelok, can stand pressure as high as the tubing rating.