Regarding using a custom distribution with HMC

it’s probably sufficient to use factor; see other posts and the repo for examples/details, e.g. this post