The beginning of a line is matched by ^. Therefore, a line starting with a # is matched by
/^#/
If you want the # to be single, i.e. not followed by another #, you must add a negative character class:
/^#[^#]/
We do not want to replace the character following the #, so we will replace it with a non matching group (called negative look-ahead):
/^#(?!#)/
To add the replacement, just change it to
s/^#(?!#)/#####/
The full line can be matched by the following regular expression:
/^#+$/
Plus means "once or more", ^ and $ have already been explained. We just have to ignore the leading and trailing spaces (* means "zero or more"):
/^ *#+ *$/
We do not want the spaces to be replaced, so we have to keep them. Parentheses create "capture groups" that are numbered from 1:
s/^( *)#+( *)$/$1# ---------- #$2/