Damn, I actually just tried it both ways and it didn't work either way. Don't know what I'm doing wrong.
The code I posted is copied directly from my working files - check the encoding on your CSV file, maybe? The localisation files need to be encoded in the same format as vanilla.
As for why I used use_first_valid, currently I'm only adjusting stuff for the Yazidi religion, but the same mod will eventually be using autocephaly with a couple other religions that will need customized titles. That parameter is basically a break statement for only evaluating the script until it finds a match.
To set the jurisdiction of your exilarchs you'll need to add the line 'pentarch = <put the exilarch's landed title here>' to the history file for titles you want under their authority. As far as I've tested, it works down to county level, but if you set it for a higher level title, any lower title that is de jure part of that one will be treated as under the Pentarch. (I also haven't tested if it works on baronies yet, if you want to be even more specific)
Unfortunately it seems that the game doesn't log pentarchy jurisdiction for different religions - the support for different religions having different seats just enables and disables their authority depending on the religion, so you'll probably want to script something to change the pentarchy seat a title is under based on the religion of its holder, since some of your seats overlap the Orthodox pentarchy with slightly different sees. The command for changing this dynamically is 'set_pentarchy_title = <pentarch title goes here>' inside the title scope.
Aside from that, assuming you fix the problem with your version of the script, I've found something rather irritating while testing mine - the autocephalous patriarchs list in the religion tab and the councilor titles in the council tab don't seem to support custom localisation - they're displaying my custom localisation command rather than the customized title.