If you look on at an online Ogham Translator, it converts words like "crann" to ᚉᚏᚐᚅᚅ, which seems to be a letter-for-letter translation. The only guide I've seen to Old Irish pronunciation is this. But I would like to essentially go into the Old Irish Dictionary (or this if that is down) and convert it to Ogham. How do I do that? Is it literally letter for letter? Or is it somehow sound-based?
It's not clear if you're asking for programming instructions: I'll assume you don't literally want to know "how do I do it". "áras" and "baithis" appear to be OIr words (as you correctly predicted, the dictionary site is down). If you consult this page of Ogham letters, you will see that there is no letter "th" (and, there is no "h"), and no letter "á". But there are some additional letters, the "Forfeda", like the letter ᚖ "oi". As Wiki suggests, some of those letters may be "early modern" – you decide if these are "proper Ogham".
On the face of it, it seems that Old Irish spelling has more information that can be expressed with Ogham. You would need to assemble the extant works written in Ogham. But then you probably should evaluate the works to determine whether it is the product of an online transliterator (I can submit the Gettysburg address and get back a bunch of automatic replacements). Perhaps you want to insist on only considering inscriptions found in the relevant ares up to the 9th century (or earlier?), excluding any neo-pagan "data". You can inspect the majority of the inscriptions in McManus A guide to Ogam, and read the related scholarly literature. An existing example is ᚉᚒᚅᚐᚂᚓᚌᚔ ᚐᚃᚔ ᚊᚒᚅᚐᚉᚐᚅᚑᚄ, transliterated as CUNALEGI AVI QUNACANOS "Cunalegi, descendant of Qunacanos". The main challenge is figuring out how to relate that to Old Irish spelling (which is like spelling in general in the era – a moving target).