Disclaimer: I first posted this to physics stack exchange, but was told to try here instead. Any desired regularity conditions can be assumed to hold for all the functions, and we assume all integrals converge. The action $S[\phi]$ is a real-valued functional, and the "classical equations of motion" are those obtained through the condition that the action is stationary, i.e $\frac{\delta S}{\delta\phi} = 0$. I do not mind less rigorous answers.
Given an action $$S = \int d^4x[\phi^2(x) \exp(\int d^4y F(x-y)\phi^2(y))]$$ it is straightforward enough to get the classical equations of motion, simply computing $\frac{\delta S}{\delta \phi}$ using the product and chain rules. My question is, how would the procedure change if the term in the exponential included derivatives, say if we had
$$S = \int d^4x[\phi^2(x) \exp(\int d^4y F(x-y)(\phi(y)+g\partial_\mu\partial^\mu\phi(y))^2)]$$
where $g$ is some constant and the partial derivatives are with respect to the $y$ coordinates. In particular, is there any way to make sense of expressions such as $\frac{\delta }{\delta\phi}\partial_\mu\partial^\mu\phi(y)$?
This is why I'd strongly urge you to not use sloppy notation like $\frac{\delta S}{\delta \phi}$; the $\delta\phi$ in the "denominator" serves no purpose. What you should do is compute the directional derivative of $S$ at the point $\phi$ along $\psi$ \begin{align} (D_{\psi}S)(\phi)&:=\frac{d}{d\epsilon}\bigg|_{\epsilon=0}S(\phi+\epsilon \psi)\\ &=\frac{d}{d\epsilon}\bigg|_{\epsilon=0} \int_{\Bbb{R}^4}\left[\left(\phi(x)+\epsilon \psi(x)\right)^2\cdot \exp\left(\int_{\Bbb{R}^4}F(x-y)\cdot \left(\phi(y)+\epsilon\psi(y)+g (\partial_{\mu}\partial^{\mu}\phi(y)+\epsilon\partial_{\mu}\partial^{\mu}\psi(y))\right)^2\,d^4y\right)\right]\,d^4x \end{align} Yes, this is a complicated looking expression on the right, but here you should think of $\phi$ and $\psi$ as fixed, and think of the RHS as a function of $\epsilon$ (for each $\epsilon\in\Bbb{R}$, after carrying out all the integral, we get a number... i.e we have a function $f_{\phi,\psi}:\Bbb{R}\to\Bbb{R}$, and we're trying to calculate the derivative at the origin of this single-variable function). Once you carry this out (by differentiating under the integra sign, using product and chain rule etc), you should get an expression involving only $\phi$ and $\psi$. Then, a function $\phi$ makes the action stationary if and only if for each $\psi$, we have $(D_{\psi}S)(\phi)=0$ (i.e for all possible directions $\psi$, if we "perturb" $\phi$ to $\phi+\epsilon\psi$ then the action $S(\phi+\epsilon\psi)$ doesn't change to first order in $\epsilon$).
Clearly, it doesn't matter how many derivatives of $\phi$ appear inside the integral. All we care about is calculating the directional derivative $(D_{\psi}S)(\phi):=\frac{d}{d\epsilon}\bigg|_{\epsilon=0}S(\phi+\epsilon \psi)$. In fact, for this, you don't even need $S$ to be defined using an integral. As long as $S$ is a mapping $V\to W$ where $V,W$ are normed vector spaces, we can consider such directional derivatives.