Yes, it is possible to do what you show in your sample here. The "SetHandler modperl" looks wrong to me, but the concept is correct. Did you actually write code for these filters?
That SetHandler directive isn't wrong, see example in mod_perl2 filters. But I overlooked something obvious: use of <Files ~ "\.php"> instead of <Location>