Is this part of a more general trend ("i" instead of "o"), or just this word?
The former, and the phenomena of this has a name in Ukrainian liguistic terminology: ikavism.
If it is, what caused this? Influence from other languages?
It is assumed that the process of transition is associated with the reduction of vowel sounds and the emergence of closed syllables as a result. The vowels of full formation [o] and [e] in closed syllables received compensatory lengthening, turning into [i] through a series of intermediate stages. Obviously, this process began earliest in the Galician-Volyn dialect area, and from there it spread to other South Rusʼ dialects.
The decline of reduced and lengthening of etymological [o] and [e] in newly closed syllables were interdependent processes and occurred simultaneously. Lengthened vowels could not have existed in the language for a long time, because it contradicted the long-standing (since the time of quantum alignment) tendency to eliminate the opposition of vowels by duration. In different dialects of Ukrainian, lengthened vowels gave rise to different reflexes: in Polissja they changed into diphthongs or other sound combinations, in Galician-Volynian and southeastern dialects they gradually turned into.
The latter, due to the decline of reduced ъ and ь in the following syllable, lengthened through the stage of diphthongization (*о > [ō] > [uo], [uɪ], [ui], [ue] ... > [i]; *е > [ē] > [ie] > [i]) or through narrowing of these vowels into monophthongs and delabialization (*о, *е > [ō], [e] > [u], [ʊ̈] > [i]) in all southeastern and many southwestern dialects changed to [i]. The positional transition of [o], [e] to [i] caused the alternation of phonemes: [о] - [і], [е] - [і], and the expansion of the combinability of vowels and consonants, in particular palatalized consonant phonemes with the vowel [i]. Secondary [і] in newly closed syllables, in accordance with the old *о, *е, as well as [і] < ě (ѣ), is the norm of the modern Ukrainian literary language.
Is it a coincidence that Germanic languages also tend to have a "ni" here?
Just coincidence.
It's still unclear to me why these changes occurred in Ukrainian, specifically, and not in other Slavic languages.
It happened almost in all North Slavic languages too, with notable exceptions as Russian and Belarussian. Ukrainian just had more stages, if we compare the phenomena in other Slavic languages. I guess, you havnʼt note because of those diacritics.
- English: a knife ~ [no] knife
- Ukrainian: ніж ~ [немаʼ] ножа
- Polish: nóż /nu…/ ~ noża /nɔ…/
- Czech: nůž /nuː…/ ~ nože /no…/
- Slovak: nôž /nu̯o…/ ~ noža /nɔ…/
For compare, one old [Ukrainian] Maksymovychʼs spelling has a spelling similar to those Slavic language where ніж would be as но̂ж.