Here is a totally different approach.
You may need to tweak the text blocks to match what you actually use as values, because this relies on a complete match in its table lookup approach:
This approach uses a lookup table (a dictionary) of values to replace and replacement values, to feed the replacement process while walking through the list items number by number.
The replacement will use the original value as the replacement value whenever it finds an item it can't find in the keys of the dictionary.
If I missed or misspellled any keys/values in the dictionary of replacements, feel free to fix them.
P.S. These blocks can be dragged directly into your Blocks Editor workspace.
See A way to group projects by theme - #10 by ABG
for a demo.

