Hamilton–Jacobi equation and Poissonian gluing for an inhomogeneous autocatalytic reaction