It's a bit complex as currently we invoke multiple phases from plasma-session. That needs matching somewhat.
It's also potentially dbus-activated, we need to handle everything in any possible order.
kmcinit could provide some inspiration, though I don't really like the part with qdbus lines.
broulik/systemd_startup in kded contains a start.