yes, the ory documentation is pretty complete but I would describe it as sparse. You need to do lots of reading and read everything.
I am using selfhosted ory for a project and do exactly what you are describing. It works.
the hooks are defined in kratos.yml, this section describes it quite well:
https://www.ory.sh/docs/kratos/hooks/configure-hooks
some caveats - we have dound POST works but for some reason GET does not (not a problem, just weird), and when you call a hook before registrationsome session info is not filled in, (but can modify the identity info, like adding metadata), if you want the sessionID and userID you will need a second hook after registration is complete. This again is not really a problem but worth knowning.