Building on the answer of Dilip, for non-integer $m$, letting $\{m\}=m-\lfloor m\rfloor$ denote the fractional part of $m$, and using the fact that $\cosh x\le \exp|x|$, the (unnormalized) target density can be rewritten as
$$
\begin{align}
f(x)&=\cosh^m(ax)\exp(-x^2/2)
\\&=\cosh^{\{m\}}(ax)\cosh^{\lfloor m\rfloor} (ax)\exp(-x^2/2)
\\&\le \exp(a\{m\}|x|)\cosh^{\lfloor m\rfloor} (ax)\exp(-x^2/2)
\\&= \sum_{k=0}^{\lfloor m\rfloor} 2^{-{\lfloor m\rfloor}} \binom{{\lfloor m\rfloor}}{k} \exp\Big(-x^2/2-a({\lfloor m\rfloor}-2k)x+a\{m\}|x|\Big).
\end{align}
$$
Like the target $f(x)$, the right hand side is symmetric around zero. For $x\ge 0$, it is proportional to the density of a mixture of $\lfloor m\rfloor+1$ Gaussian distributions truncated below zero. Completing the square in $x$, the mean (before truncation) of component $k$ is
$$
\mu_k=-a(\lfloor m\rfloor-\{m\}-2k)
$$
and the associated weights are
$$
w_k \propto \Phi(\mu_k)\binom{\lfloor m\rfloor}{k}e^{\mu_k^2/2}.
$$
We can easily simulate proposals efficiently from this mixture (using the alias and inversion methods), and then obtain samples from $f(x)$ by accepting the proposals with probabilities given by $f(x)$ divided by the above right hand side.
The acceptance probability simplifies to
$$
\left(\frac{1+\exp(-2a|x|)}{2}\right)^{\{m\}}>\frac1{2^{\{m\}}}
$$
so the overall acceptance probabilty is always greater than 1/2.
R implementation:
dcoshgauss <- function(x, a, m)
cosh(a*x)^m*exp(-x^2/2)
rcoshgauss <- function(n, a, m) {
floorm <- floor(m)
fractm <- m - floorm
kk <- 0:floorm
mu <- -a*(floorm - fractm - 2*kk)
w <- pnorm(mu)*choose(floorm, kk)*exp(mu^2/2)
w <- w/sum(w)
xx <- numeric(n)
i <- 0
s <- 0
while (i < n) {
k <- sample(kk+1, size = 1, prob=w)
u <- runif(1, pnorm(-mu[k]), 1)
x <- mu[k] + qnorm(u)
acceptprob <- ((1+exp(-2*x*a))/2)^fractm
u <- runif(1)
s <- s + 1
if (u<acceptprob) {
sign <- sample(c(-1,1), 1)
x <- sign*x
i <- i + 1
xx[i] <- x
}
}
cat("Acceptance probability was",n/s,"\n")
xx
}
set.seed(1)
x <- rcoshgauss(1e6, 1, 2.9)
#> Acceptance probability was 0.5489607
hist(x, breaks=200, xlim=c(-8,8), main="")

curve(dcoshgauss(x, 1, 2.9), -8,8)

Created on 2024-01-28 with reprex v2.0.2