It's not bad writing, but it is a common technique and has only light impact. So, writing with a current weakness. Consider your above examples: "The forest seemed endless." This has roughly the same effect as the previous line with the repetition but is more effective. You only need one of those lines, really.
In the second example, take out the 'up and up' sentences/clauses and you're left with much more vivid and effective prose. Delete the repetitions and it's an instant improvement. Just because you haven't stated the idea you have in mind - he climbed for a long time - doesn't mean you haven't suggested it strongly (because you have). Really, what is more interesting? Feeling the character's exhaustion with them, or registering the subjective idea that he is exerting significant effort?
In a poetry class I was told that nouns are the key to description. Nouns are the most direct way to an image or sensation. Another way to interpret that observation is that specificity comes from something to focus upon. Nouns are subjects, adjectives are mere modifiers. So for example: if the characters are marching through a forest, a very specific, moss-covered trunk growing over a large stone is a sight the characters can encounter a second time in their marching. When perceived along with their throbbing backs and strained knees, they realize their lack of progress and can only help but stop for a despair-soaked break. Sensory details and characters reacting to a specific stimulus tell as much or more then describing the intended impression.
In a way, by repeating words you are focusing too much on 'telling' the idea you want to confer to the reader, instead of focusing on an image of stimulus that suggests that idea, aka 'showing.'