Summary: What I think from evidence in the following sections
- 其 is a syllabic particle without lexical meaning and grammatical function.
與其=與
尤其=尤 The more ancient it is, the more frequent 尤 is used. At the extreme, in Standard Mandarin 尤 is not used stand-alone except for fixed expressions inherited from Classical Chinese.
- 其 is a future tense particle derived from irrealis modality.
殆其失國。
- 何其 is more complicated.
① 其 is a syllabic particle without lexical meaning and grammatical function.
賜,汝來何其晚也? (賜,你來得為什麼這麼遲?)《史記》
② 其 is an intensifying particle.
曷其有機? (什麼時候有盡頭?) 《詩》
③ 其 is an interrogative particle, pronounced as ji1.
若之何其? (怎麼辦呢?) 《尚書》
Usage ③ is distinctively different. But for ① and ②, I simply tried to replace one with the other and put it back in contexts to feel the difference. If it feels different, I put it as ②, otherwise ①.
This section all comes from 陽伯峻
①其 sometimes is used in the middle of a sentence without obvious meaning or grammatical function. It simply adds a syllable. Under this entry, he gave some examples when 其 is used with other characters.
賜,汝來何其晚也? (賜,你來得為什麼這麼遲?)《史記》
彼其之子,不稱其服。 (那個人呀,衣着不相稱呀。)《詩》 The second 其 is a 3rd person pronoun (including inanimate) at the genitive case.
You also mentioned 殆其. 殆 is also a modal particle meaning uncertain. Sometime it's used in 殆乎,殆于,其殆, adding an extra syllable for easier reciting.
殆乎非士也。 (恐怕不是人才。) 《呂氏春秋》
殆于不可。 (大概不可以吧。) 《孟子》
其殆庶兒乎。 (大概很可以吧。) 《易經》
You also mentioned 與其. 與 is a comparison conjunction. There's a fixed structure 與(其)……岂若/不若/不如/孰若. 陽伯峻 equates 與=與其. He doesn't say what role 其 plays here, so I tentatively put it here.
與我處畎畝之中。 (與其我在田野之中。) 《孟子》
與其生而無義。 (與其活下來而沒有義節。) 《史記》
It seems that 與 and 與其 can be used interchangeable. I don't feel any difference in modality.
Before 秦,尤 is used only as noun and verb. It's used in 《左傳》 more than 10 times, all as noun or verb.
仲尼尤其不能自安。 (仲尼尤其不能安於這種現象。) 《左傳》 陽伯峻 doesn't say what role does 尤其 play here, only translates it as 尤其 in Modern Chinese. I don't see how 尤 is a verb here.
After 秦, 尤 can be used as an adverb, which can be translated as 尤其 in Modern Chinese.
而尤善律曆。 (而尤其長於樂律和曆法。) 《史記》
Again, he doesn't say what role 其 plays here. I tentatively put it here since I don't feel any modal difference between 尤 in Classical Chinese and 尤其 in Modern Chinese.
②其 is used as a interrogative particle, pronounced as ji1, sometimes written as 居.
若之何其? (怎麼辦呢?) 《尚書》
夜如何其? (夜晚怎麼樣呢?) 《詩》
The two modal usage of 其 you mentioned is also documented by 陽伯峻. As follows. I think they also fit your examples though in the examples he gives 其 is used alone.
③ imperative.
君子其無廢先君之功! (你不要廢棄先君的功業!) 《左傳》
爾其無忘乃父之志! (你不要忘記你父親的心願!) 歐陽修
He only gives these two examples, and in both of them 其 is used after the subject.
④ speculative.
其陳桓公之謂乎。 (大概講的是陳桓公吧。) 《左傳》
堯舜其猶病諸。 (堯舜可能還做不到哩。) 《論語》
This section comes from 社科院 《古代漢語虛詞詞典》. I only list what I think is credible and is different or absent from 陽伯峻's.
①何其/曷其 (何、曷 have the same meaning and pronunciation and can be used interchangeably): 其 is an intensifying modal particle.
曷其有機? (什麼時候有盡頭?) 《詩》
②殆其 speculative adv used before predicate. 恐怕將、可能會
It doesn't say what role 其 plays, but from the translation it seems to be of irrealis and future.
國不忌君,君不顧親,能無卑乎?殆其失國。 (国人不畏惧国君,国君不顾念亲人,地位能够不下降吗?恐怕将会丢掉他的国家。found on Internet) 《左傳》
In this example,殆其 cannot be used instead of 殆. Compare it with
殆先生乎? (大概就是先生吧?) 《史記》 There's no future tense involved.
This is corroborated by 陽伯峻. He says that 其 can be an adv to signal future tense.
予其殺。 (我將殺死他們。) 《尚書》