But in the case of ō, you can only use a doubled letter if the underlying word is おお. If it is おう then you don't have a doubled letter you can use; you need "ou" and that's not Hepburn any more. It is "wāpuro rōmaji" (word processor romaji).
(To differentiate between the case where it's actually two vowels, you have to put an apostrophe inbetween; their example is 小唄 -> ko'uta.)