The main trick is knowing how long it takes for an op to become opped after they've joined, so your script would have to wait at least that long to give them a chance to op up.
You'll create a queue of nicknames that you've stacked up to VERSION and then work through that queue after the minimum time has elapsed. A good idea is to simply reset the wait-timer in case of heavy join activity, netsplits, or abusive part/join behavior. If the queue list exceeds say 5 or 10 users, then dump it and set a 5 minute cooldown ignore.
As you work through this queue of nicknames, you check if they are '(%nick !isop #help)' before versioning them, otherwise skip and try the next name in the queue if any.
Well. At least I won lunch.
Good philosophy, see good in bad, I like!