Towering Cistercian representation
JavaScript (Node.js), 265 bytes
f=n=&gt;n?`01238888765${n&lt;1e4?4:48888}`.replace(e=/\d/g,y=&gt;`4567|3210
`.replace(e,x=&gt;&quot;_ \\/.'|&quot;[q=y/2&amp;2|x&gt;3,y&amp;8?1:(k='40321123'[j=~~('0x'+(1e6+'1023405671567899AB99A899CB99C')[y%4+~-(n/10**q%10)*4])]^x%4?2045&gt;&gt;j&amp;1:'0122233346545'[j])^0xCC6600&gt;&gt;k*4+q&amp;1]))+f(n/1e4|0):''

Try it online!
Encoding
Each digit pattern is a 4x4 matrix consisting of 7 distinct characters. Each character is encoded as a single decimal digit from 0 to 6:
0: &quot;_&quot;
1: &quot; &quot;
2: &quot;\&quot;
3: &quot;/&quot;
4: &quot;.&quot;
5: &quot;'&quot;
6: &quot;|&quot;

All matrices are built with 13 distinct rows, encoded as a single hexadecimal digit from 0 to C:
0: 1111 for &quot;    &quot;
1: 0001 for &quot;___ &quot;
2: 2111 for &quot;\   &quot;
3: 1211 for &quot; \  &quot;
4: 1121 for &quot;  \ &quot;
5: 1131 for &quot;  / &quot;
6: 1311 for &quot; /  &quot;
7: 3111 for &quot;/   &quot;
8: 1114 for &quot;   .&quot;
9: 1116 for &quot;   |&quot;
A: 1115 for &quot;   '&quot;
B: 0004 for &quot;___.&quot;
C: 0005 for &quot;___'&quot;

So, each matrix is fully described by a sequence of 4 hexadecimal digits. For instance, the matrix for 7 is encoded as B99A:
B99A -&gt; 0004 -&gt; &quot;___.&quot;
        1116    &quot;   |&quot;
        1116    &quot;   |&quot;
        1115    &quot;   '&quot;

The leading sequence is 0000 and is omitted. The other sequences are stored as:
1e6 + '1023405671567899AB99A899CB99C'

which expands to:
0      1    2    3    4    5    6    7    8    9
(0000) 1000 0001 0234 0567 1567 899A B99A 899C B99C

Each matrix row is made of a 'background' character appearing 3 times and a 'foreground' character appearing only once (or not at all). So the rows can be encoded as:

the position of the 'foreground' character (0 for rightmost to 3 for leftmost, or 4 if none)
the 'background' character (which is always either 0 for &quot;_&quot; or 1 for &quot; &quot;)
the 'foreground' character

This is summarized in the following table:
 ID | string | digits | FG position | BG char. | FG char.
----+--------+--------+-------------+----------+----------
  0 | &quot;    &quot; |  1111  |      4      |    1     |    0
  1 | &quot;___ &quot; |  0001  |      0      |    0     |    1
  2 | &quot;\   &quot; |  2111  |      3      |    1     |    2
  3 | &quot; \  &quot; |  1211  |      2      |    1     |    2
  4 | &quot;  \ &quot; |  1121  |      1      |    1     |    2
  5 | &quot;  / &quot; |  1131  |      1      |    1     |    3
  6 | &quot; /  &quot; |  1311  |      2      |    1     |    3
  7 | &quot;/   &quot; |  3111  |      3      |    1     |    3
  8 | &quot;   .&quot; |  1114  |      0      |    1     |    4
  9 | &quot;   |&quot; |  1116  |      0      |    1     |    6
  A | &quot;   '&quot; |  1115  |      0      |    1     |    5
  B | &quot;___.&quot; |  0004  |      0      |    0     |    4
  C | &quot;___'&quot; |  0005  |      0      |    0     |    5
----+--------+--------+-------------+----------+----------
                             |           |          |
                             |           |          +--&gt; stored as &quot;0122233346545&quot;
                             |           +-------------&gt; stored as the bit mask 2045
                             +-------------------------&gt; stored as &quot;40321123&quot;