If you are running the factory exhaust on a 172 ph2 then it's likely the middle section baffles that are fooked. It was a common problem a few years ago when 172s were still current.
symptoms: You get the engine warm/hot, rev it up past 4k then when you let off & the revs are dropping back down it vibrates at 4k rpm.
You can try moving heatshields & stuff, but the best bet is to get the middle section taken out & replaced with a straight through piece, which is what I had done. It doesn't make it much louder, just makes the sound a little deeper, but hardly noticable.