The first solution can be generalized:
() {
local k v
for k v in "${(kv)_comps[@]}"; do
if [[ ${functions_source[$k]:-$commands[$k]} == ~/* &&
$functions_source[$v] != ~/* ]]; then
_comps[$k]=_default
fi
done
}
This will disable programmable completions for all commands and
functions defined under $HOME that don't have their own completions.
If you have compdef calls in your dotfiles, you'll need to move them
below this stanza.
If anyone wants to use this, beware that it may increase zsh startup time. On a raspberry pi -- the slowest machine I've tested this on -- it takes 45ms. Here's a faster version that does the same thing. As is often the case with optimized zsh, it's unreadable.
() {