Are these things allowed under the UPC to replace trap primers?
I doubt that it would be code as it would probably over years either not open or permanently hold it's shape in the closed position from lack of use.
The best trap primer I've ever seen is a tee off underground on the upright of a floor drain catching a condensate drain for a humidifier or A/C A-coil. Either winter or summer you have activity for the trap to stay full.
Read what the end of this sentence means.