Arch Linux Picom version 12.5 example configuration file is very different from the earlier one. To prevent it from freezing, it needs a test without a Bash script.
You should read the manual page, it will answer questions like this. For example if you look up the ‘Test’ conditional you will see how it can be used. You cannot test environment variables directly like that, but you can use Test (EnvMatch varname pattern) to test things.