How to substitute substring in column A with matching string in map table
I wouldn't do this. This is called "lexicon replacement". It's done using FTS's Thesaurus Dictionary. You can ask another question if you have a problem getting that working and you decide to go down that route.

That said, if you want to do this recursively, you can. It's certainly doable.

WITH RECURSIVE f AS (
  SELECT row_number() OVER (), *
  FROM bar
),
t(orig,working,row) AS (
  SELECT a , a , 0
  FROM foo
  UNION ALL
    SELECT orig, regexp_replace(working,pattern,repl), row+1
    FROM t
    INNER JOIN f
      ON row_number = row+1
)
SELECT orig, working
FROM t
WHERE row = (SELECT count(*) FROM f)
ORDER BY orig;


Output

           orig            |                    working                    
---------------------------+-----------------------------------------------
 one, 1, four, 4, three, 3 | one apple, four oranges, three strawberries
 one, 1, two, 2, three, 3  | one apple, two bananas, three strawberries
 two, 2, four, 4, three, 3 | two bananas, four oranges, three strawberries
(3 rows)


Note if you have a serial on bar then remove CTE f.