using regexp substitution part in postgres string functions
You got it all wrong.
As in any other function execution, the regexp function parameters are evaluated before the execution and not during the execution.

This are the replace strings you are actually using:

with a as (select 'a 2 b'::text s)
select
     ''                     as empty_string
    ,'\1'                   as _regular
    ,concat('.','\1','.')   as concat_regular
    ,length('.\1')::text    as length_string
    ,reverse('\1')          as reverse_string
    ,initcap('\1')          as initcap_broken
    ,'\1'                   as initcap_orig
    ,ltrim('\1','a')        as ltrim_broken
    ,lpad('\1',5,'.')       as lpad_broken
    ,ascii('\1')::text      as ascii_broken
    ,format('\1')::text     as format_regular
    ,repeat('\1',3)         as repeat_regular
from a




+--------------+----------+----------------+---------------+----------------+----------------+--------------+--------------+-------------+--------------+----------------+----------------+
| empty_string | _regular | concat_regular | length_string | reverse_string | initcap_broken | initcap_orig | ltrim_broken | lpad_broken | ascii_broken | format_regular | repeat_regular |
+--------------+----------+----------------+---------------+----------------+----------------+--------------+--------------+-------------+--------------+----------------+----------------+
|              | \1       | .\1.           | 3             | 1\             | \1             | \1           | \1           | ...\1       | 92           | \1             | \1\1\1         |
+--------------+----------+----------------+---------------+----------------+----------------+--------------+--------------+-------------+--------------+----------------+----------------+