I saw it in a historical info sign in the sentence "Ce métier ô combien difficile et périlleux a disparu progressivement avec le temps." I was astonished to encounter a one-letter word that I'd never seen before. The wiktionary entry gives no definition, and the TLF entry is a bit confusing. What does this word mean? Is it very formal, or very rare?
The word "ô" is essentially an outdated way of saying "oh !", and rarely used by itself except as part of this set phrase "ô combien + adjective" that means "(this job) oh so (difficult and dangerous)", expressing awe in an emphatic and often ironic fashion.
ps : J'ai trouvé ça drôle, moi aussi, la première fois que je l'ai rencontré.
The Latin word o that had a wide range of usage (From the Gaffiot: to call, invoke, wish, express surprise, indignation, happiness, pain, …), has produced three French interjections pronounced the same way: oh, ho, and ô. They have some overlapping meanings but also their own specificity.
The ô variant is more literary, that's likely the reason why you hadn't seen it before.
Unlike the others, ô is always followed by another word while oh and ho can be used alone or as part of a short exclamatory sentence. The one word sentence "ô ! " is "forbidden".
Oh ! combien de marins, combien de capitaines… - Victor Hugo
Ô rage ! ô désespoir ! ô vieillesse ennemie ! N'ai-je donc tant vécu que pour cette infamie ? - Corneille
Oh là la ! (Oh, boy!, Yikes!)
Ho ! Hisse ! (Heave-ho!, one, two, three, hup!)
Ho ! combien de fois il faut te le répéter ? (Hey!)
Ce pont, ô combien nécessaire, … (much needed)
While ô combien might sometimes be used an ironical way, there is absolutely no sign of irony in your quote:
Ce métier ô combien difficile et périlleux a progressivement disparu avec le temps
This occupation, how difficult and perilous was it !, has faded away over time.
Because of the exceptional tides and the shifting sands, the Moulières d'Honfleur were risking their lives collecting the mussels.