Gödel numbering of a string
JavaScript (ES7),  75  72 bytes
Expects an array of ASCII codes.
a=&gt;a.map(g=k=&gt;--d-1?g(k,d=n%d?d:++n):p*=n**(17088/k%75%14|1),d=p=n=1)&amp;&amp;p

Try it online!
Magic formula
The formula 17088/k%75%14|1 was found by injecting random values into several handcrafted templates.
More specifically, the template for this one was `${p}/k%${m0}%${m1}|1` with \$0&lt;p&lt;10^5\$, \$0&lt;m_0&lt;10^3\$ and \$12\le m_1 \le 15\$.
 char. |  k  | floor(17088 / k) | mod 75 | mod 14 | OR 1
-------+-----+------------------+--------+--------+------
  '('  |  40 |        427       |   52   |   10   |  11
  ')'  |  41 |        416       |   41   |   13   |  13
  '0'  |  48 |        356       |   56   |    0   |   1
  'A'  |  65 |        262       |   37   |    9   |   9
  's'  | 115 |        148       |   73   |    3   |   3
  '|'  | 124 |        137       |   62   |    6   |   7
  '~'  | 126 |        135       |   60   |    4   |   5

Commented
a =&gt;                // a[] = input
a.map(g = k =&gt;      // for each ASCII code k in a[]:
  --d - 1 ?         //   decrement d; if d is not equal to 1:
    g(              //     do a recursive call to the callback function:
      k,            //       pass k unchanged
      d =           //       update d:
        n % d ? d   //         if d is not a divisor of n, leave d unchanged
              : ++n //         otherwise, increment n and set d = n
    )               //     end of recursive call
  :                 //   else (n is now the next prime):
    p *=            //     multiply p by
      n ** (        //     n raised to the power of
        17088 / k   //     the odd positive integer &lt;= 13 which is obtained
        % 75 % 14   //     by applying our magic formula to k
        | 1         //
      ),            //
  d = p = n = 1     //   start with d = p = n = 1
) &amp;&amp; p              // end of map(); return p