That formula is missing the effects of animation length. I have included these in the one I posted on AoMH:
DPH = DPS * (1 - armor) * (animation length) * (anim length multiplier)
where I've condensed all bonus multipliers of any sort (proto or techtree based) into DPS.
I have tested the HeightBonusMultiplier and found that it is indeed all or nothing. But not in the way we thought. There seems to be an arbitrary elevation difference at which it kicks in. I have attached a picture of the approximate elevation at which it kicks in.
The test involves two unupgraded Toxotes. Under similar elevation, they do 5 or 6 DPH (rounded from 5.525 = (1-0.18)*(6.5), interestingly, it seems to alternate between 5 and 6 on each shot but I'm not sure if this is accidental or by design). At or above the elevation difference shown in the picture, the higher one does 7 DPH (rounded from 6.90625 which is +25%, there may have been some 6's in there as well but almost all the shots do 7) and the higher one wins every time. Increasing the elevation beyond this does not change anything.
The next step is to measure elevation in units of editor tiles using a custom ruler model, then check this against the elevations specified in cliffheights, etc. and see if that is also the unit the game uses. If not, I can adjust the scale on the ruler. Then, with a number in hand for the critical elevation, we can run a search for it and see if it's modifiable in the configs or elsewhere (although I suspect it's hard coded). As it stands, the HeightBonus is barely noticeable in game. I may be wrong, but I don't think competitive players even consider it. It is certainly considered in aoe2 so perhaps the multiplier should be increased on a per-unit basis even if we can't decrease the cutoff elevation. I suspect aoe2 has a more sophisticated system where the multiplier is based on the relative elevation (which is what I was hoping for AoM).