Are you sure you want to jeopardize a friendship that has lasted so long?
Okay, here's the scoop: You are correct, but alternate explanations are also true.
i believe it was in Season 2 of the American Generation 1 cartoon that the episode "War Dawn" explained how Orion Pax (note the spelling--although, as i recall, he did move packs of stuff around that factory where he worked) was mortally damaged and rebuilt into Optimus Prime. (i would have put a spoiler warning, but you knew all that already, excaliber, and anybody who's read this far already read what i said in your post.)
Okay, now here i might need a big giant honkin' SPOILER WARNING. But, this is really barely a spoiler. Dreamwave comics' War Within series was kind of a prequel to G1. In that continuity, Optimus Prime used to be an archivist named Optronix. i have not had a chance to read many of the comics from that series, but i do not believe he become Prime because he was rebuilt after being damaged; rather, the Matrix chose him to make him the new Prime.
Transformers: The Ultimate Guide recounts the Dreamwave explanation, but mentioned "Orion Pax" as Optronix's nickname. In addition, The Ultimate Guide does point out that there are a number of inconsistencies in Transformers continuity.
It also points out, as i will, that while some such inconsistencies are accidental, others are intentional. The anime Transformers: Robots in Disguise (called Car Robots in Japan) starts an entirely new continuity; another continuity consists of (also anime) Transformers: Armada and Transformers: Energon--i think Transformers: Universe is also part of that storyline. Several newer TF series also exist, and i think there are some tie-ins and some new alternate TF realities, but i'm having trouble keeping up with them and which is what. (For that matter, i only saw about three episodes of Car Robots in Disguise, and all the shows since then have been on cable, which i ain't got.)
The bottom line: Your explanation for the origin of Optimus Prime is correct, and furthermore it is the first official explanation. But it is no longer the only correct or official explanation.