Sorry, but that's not correct. Yes a grade 8 is harder but its also stronger than a Grade 5.
Yes, a grade 8 is stronger in both tensile and shear... but it won't hold up as long in an application where it's allowed to flex even a tiny bit.
If I'm understanding this correctly, we ain't lookin' for tensile or shear strength in this application... we're lookin' for something to hold up under repeated deformation.
If I'm understanding the OP, the bolt is used more like a retaining pin than a clamping fastener... it ain't "clamping" two (or more) pieces of metal together. Meaning every time the thing is stressed with side load it's allowed to flex (or bend) a bit... and in that situation a grade 8 will become brittle much faster than a grade 5. The grade 8 starts out stronger, but weakens at a faster rate... likely the grade 5 can handle the tiny bit of flexing (or bending) without any appreciable degradation.
Take two bolts, a grade 5 and a grade 8, clamp them in a vise.
Bend them over one way an inch or two and than back the other way a couple inches, repeat until the bolts break.
Which bolt breaks first??
*