Is there x86 virtualization available on Power9, like there is for ARM?
You would run stanc3 with virtualization to generate the .hpp file and then compile for Power9 like usually.
@StaffanBetner has used this on ARM before we added the pre-built the ARM Linux binary for stanc3.
See Problem compiling models with cmdstan on arm64 - #4 by StaffanBetner and QEMU emulation of stanc3 on architectures without provided binaries · Issue #956 · stan-dev/cmdstan · GitHub
If this isnt available you could generate it using the stanc3.js. For that you would need node install on the Power9 machine.