Making a Mountain out of a Molehill You are given a string of terrain, with molehills and mountains:

                        /\
                       /  \
              _/\__   /    \
          ___/     \_/      \_
____/\___/                    \___


Your job is to replace every molehill in the string with an equivalent mountain centered in the same column. The rest of the string must be unaffected. This may require additional lines at the beginning of the string.

A molehill consists of adjacent columns where the terrain goes up, immediately followed by adjacent columns where the terrain goes down. The shortest side must be exactly one column wide.

These are all molehills:

_____/\______

   /\________
__/

________/\
          \__

\           /
 \         /
  \       /
   \     /
    \/\_/


These are not molehills:

    /\
___/  \______

      ___
_____/   \___

____  _______
    \/


A mountain is like a molehill, but the shortest side is four lines high instead of one.

Examples

                  /\
                 /  \
           -&gt;   /    \
____/\____    _/      \_

                       /\
                      /  \
                     /    \
           __ -&gt;    /      \__
_     /\__/      __/
 \___/

                         /\
                        /  \
               -&gt;      /    \
  /\                /\/      \
_/  \__/\_____    _/          \_

_                _    _                _
 \              /      \      /\      /
  \            /        \    /  \    /
   \          /          \  /    \  /
    \        /     -&gt;     \/      \/
     \      /
      \    /
       \/\/

                             /\      /\
                            /  \    /  \
                           /    \  /    \
_                     -&gt; _/      \/      \
 \                                        \
  \                                        \
   \/\______/\_______                       \_

                        /\                           /\       /\
                       /  \               /\        /  \     /  \
              _/\__   /    \       -&gt;    /  \      /    \   /    \
          ___/     \_/      \_          /    \  __/      \_/      \_
____/\___/                    \___    _/      \/                    \___


Additional Rules


Standard loopholes are forbidden.
Input and output can be in any reasonable format.
You may assume the presence or absence of trailing whitespace in the input string.
There will always be enough space in the sides of the string as well as between molehills for any mountains you might need.
If replacing the molehills with mountains creates additional molehills, you do not need to turn those molehills into mountains.
The terrain cannot go both up and down in the same column. If this happens, the terrain does not move.
If a particular column does not become part of a mountain, its height must remain unchanged.


This is code-golf, so the shortest answer in bytes wins.
Python 2, 509 495 480 bytes

def f(S):
 B='\\';F='/';s=''.join(map(max,*S.split('\n')));t=list(re.sub(r'..((./\\[^\\])|([^/]/\\.))..',r'////\\\\\\\\',s));C=s.count;D=t.count;d=C(F)-D(F)+D(B)-C(B);m=[{'_':F,B:'_'},{'_':B,F:'_'}][d&lt;0];d=abs(d);i=1
 while d:
&#9;if s[i]!=t[i]:i+=7
&#9;elif t[i]in m:d-=1;t[i]=m[t[i]]
&#9;i+=1
 return'\n'.join(u for u in map(''.join,zip(*[u.ljust(2*len(S))for u in reduce(lambda (a,p),c:(a+[' '*[p,p-1][c==B]+c],p+[[0,-1][c==B],1][c==F]),t,([],len(t)))[0]]))[::-1]if u.strip())
import re

Try it online!
Still not clear what the actual rules are; but here are the additional constraints that are enforced above and beyond the rule that molehills shall be turned into mountains:

The first and last terrain characters of the output must be _, just as they must be for valid inputs.
The vertical difference between the first _ and the last _ must be maintained between the input and output.
After substitutions from turning molehills into mountains, some other characters might need to be changed in order to maintain said vertical difference; but the characters changed must not be any of the characters that are part of mountains that were created from molehills.
And when accomplishing these changes, the number of additional characters changed must be minimal.

Ungolfed Algorithm:
def f(s):
    s = ''.join(map(max,*s.split('\n'))) # flatten into a single line
    t = re.sub(r'..((./\\[^\\])|([^/]/\\.))..',r'////\\\\\\\\',s) # replace molehills with mountains
    d = s.count('/')-t.count('/')+t.count('\\')-s.count('\\') # are the two strings equally balanced?
    m=[{'_':'/','\\':'_'},{'_':'\\','/':'_'}][d&lt;0] # make an appropriate mapping...
    d=abs(d);i=1 # skip over leading '_'...
    while d: # while still unbalanced...
        if s[i]!=t[i]:i+=7 # skip over any created mountains (7+1==8)
        elif t[i] in m:d-=1;t = t[:i]+m[t[i]]+t[i+1:] # if can replace, do replace
        i += 1 # next char
    t = reduce(lambda (a,p),c:(a+[' '*[p,p-1][c=='\\']+c],p+[[0,-1][c=='\\'],1][c=='/']),t,([],len(t)))[0]  # pad spaces at left side
    t = map(''.join,zip(*[u.ljust(max(map(len,t))) for u in t])) # rotate
    return '\n'.join(u for u in t[::-1] if u.strip()) # reverse and join into lines.
import re