One thing that seems wrapped up in the question is whether you can use the angle to the visible horizon regardless of altitude. For the equation to work, you need the angle between the sun and the horizontal plane containing the aircraft. The higher the aircraft, the greater the angle between that plane and the visible horizon.
From a quick google search, you either need to correct for the "angle of dip" to the visible horizon, or use a sextant with a bubble attachment (basically an artificial horizon). I didn't try to run the numbers and find how big the altitude-based error would be if you didn't correct for dip.