Here is my version of your filter, which also works on multiple layers :
test_couleurs_boostees :
-repeat @# -l[$>]
--remove_opacity # '--' add the result as a new image to the list.
-gimp_painting[-1] 5,2.5,1.5,50,1
-gimp_morpho[-1] 5,5,0,0,0,0
--cartoon[-1] $1,80,20,0.25,1.5,8
-compose_screen[-2,-1]
-transfer_colors 0
-endl -done
The thing you've perhaps not seen is the use of the double dashed commands 'e.g. --cartoon[-1] ..', which does the same as the simple dashed call except that it inserts the resulting image at the end of the list, instead of just acting in-place.
Let me know if that is working for you.