Octane is a combustion inhibitor - fuels with higher octane actually burn more slowly than fuels with lower octane, but contain the same amount of energy.
Higher octane is only needed for high performance engine that would exhibit pre ignition, or knock, with regular fuel. It also depends on the altitude you are at, or more specifically, the air pressure. Lower air pressure means you can get away with lower octane fuel, higher air pressure means you need higher octane fuel to prevent pre ignition.
What you're describing is detonation, not pre-ignition....but many, many people get the two confused.
Detonation is the spontaneous combustion of the end-gas (remaining fuel/air mixture) in the chamber. It always occurs
after normal combustion is initiated by the spark plug. The initial combustion at the spark plug is followed by a normal combustion burn. For some reason, likely heat and pressure, the end gas in the chamber spontaneously combusts. The key point here is that detonation occurs
after you have initiated the normal combustion with the spark plug.
Pre-ignition is defined as the ignition of the mixture prior to the spark plug firing. Anytime something causes the mixture in the chamber to ignite
prior to the spark plug event, such as hot spots in the combustion chamber, a spark plug that runs too hot for the application, or carbonaceous deposits in the combustion chamber heated to incandescence by previous engine combustion, it is classified as pre-ignition. The two are completely different and abnormal phenomenon.
Using the improper grade of gas and the resultant knocking/pinging heard is detonation. Just an FYI.