…on dearu grammar rules, I only manage to find forum answers that it's a formal, written replacement of desu/da.
Indeed, as you mentioned, である can replace だ/です for formality; notably in literature. This much is true.
…where it's used, in the middle of [a sentence], clearly [doesn't] allow for …desu/da to be inserted haphazardly.
Correct, that's an important observation. In the famous book A Dictionary of Intermediate Japanese Grammar, they explain that である can also be used as a "prenominal form" in the middle of sentences, whilst だ and です cannot.
This raises the question: "What is a prenominal form?"
It means である must precede a noun and somehow connect a description to it. It's like the formal version of the 「の」 particle, which incidentally is interchangeable with である in many such cases.
In your example, である has effectively replaced the 「の」 particle to make the sentence more formal.
I've included a reference with the page number for your further reading. I know you asked this question a year ago, but the answer I found is quite different to the answers that already exist here, so I hope this helps!
Reference:
Makino, Seiichi; Tsutsui, Michio (1995). A Dictionary of Intermediate Japanese Grammar (50 ed.). Tokyo, Japan: The Japan Times. p. 33. ISBN 978-47-89007-75-7.