Also, I have to stress that not even launchctl is enough to satisfy all install, upgrade and uninstall scenarios. You can read about it in this old thread.
<https://lists.macosforge.org/pipermail/launchd-dev/2010-February/000741.html>
Over the years I've tried various workarounds for this (like the "bsexec" stuff in the afore-mentioned post) but none of them are satisfactory. Specifically, they:
o always seemed like a hack
o never worked with pre-login launchd agents
o have broken on recent systems [1]
I'll repeat the take-home message from that post:
[...] there's only one way to solve the "first install problem"
that's guaranteed to be compatible in the long term: force a restart.