You can look up the hardness of bolts. If I remember correctly Grade 8 bolts can be close to Rockwell 30 hardness. You could probably buy the proper length bolt online and have it delivered to you sometime next week for around $5.
Could you stack some flat washers under the nut or under the bolt head so you could use the longer bolt without modifying it? That would retain the full strength of the bolt.
As others have said, bolt threads are roll formed before heat treating. Cutting longer threads on a bolt does work, but it introduces stress risers that weaken the bolt. In an application where there can be a lot of shock I would try to avoid using a modified bolt, or have a plan to replace it before it breaks.