Consider the following lattice:
$L = \begin{bmatrix} n & 0 & m^2 & 2m^3 & \cdots & (d-1)m^d \\ 0 & n & -2m & -3m^2 & \cdots & -dm^{d-1} \\ 0 & 0 & 1 & 0 & \cdots & 0 \\ 0 & 0 & 0 & 1 & \cdots & 0 \\ \vdots & \vdots & \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & 0 & 0 & \cdots & 1 \end{bmatrix}$
where $n \in \mathbb{Z}$ and $m$ is chosen at random, $0 < m < n$. This is a 'knapsack style' lattice and we can use e.g. the LLL algorithm to reduce $L$ and produce a basis with shorter coefficients, in this case of size $O(n^{2/(d+1)})$.
Notice that a general column corresponds to the polynomial
$f = x^d - dm^{d-1}x + (d-1)m^d$
which is special insofar as the integer $m$ is a root of both $f$ and $f'$ (by inspection).
Since $f$ and $f'$ have a common root in $\mathbb{Z}/n\mathbb{Z}[x]$, by definition the resultant $\text{Res}(f,f')$ vanishes in $\mathbb{Z}/n\mathbb{Z}$.
Since the discriminant $\Delta$ of $f$ is given by
$\Delta = (-1)^{d(d-1)/2}\text{Res}(f,f')/\ell(f)$
(where $\ell(f)$ is the leading coefficient of $f$), this means that $n$ divides the discriminant of $f$. This is a very useful feature, and may have uses in computational algebra (see e.g. Integer factorization via Selmer group of a number field and HT90).
For a given $n$ we want the coefficients to be as small as possible. Unfortunately the above algorithm gives coefficients of size only $O(n^{2/(d+1)})$, whereas an optimal polynomial would give coefficients of size $O(n^{1/(2d-2)})$, by examination of the general formula for discriminant in terms of the coefficients.
The above algorithm seems capable too of finding the optimal polynomial for a given $n$, because such a polynomial must have a root mod $n$ and with the correct choice of $m$ we do recover polynomials with the correct coefficient size in practice (the lattice $L$ ends up being very skewed and the optimal vector is usually the shortest) however we would have to be very lucky with our choice of $m$, basically amounting to correctly guessing a root of the optimal polynomial mod $n$.
Is it possible to do better than exhaustive search to find the optimal polynomial for a given $n$?
There seems to be quite a lot of mathematical structure and perhaps e.g. there is some group action that could be used to advantage.
Note that certain cases (degree 3 and 4) have been solved, see [1],[2], but these require finding the generators of the Mordell-Weil group of an elliptic curve, which is a computationally difficult problem, in contrast to the above algorithm which uses only LLL and thus runs in polynomial time.
[1] Klaška, Jiří. On cubic polynomials with a given discriminant. Math. Appl. (Brno) 10 (2021), no. 2, 103--113.
[2] Klaška, Jiří. "Quartic Polynomials with a Given Discriminant" Mathematica Slovaca, vol. 72, no. 1, 2022, pp. 35-50. https://doi.org/10.1515/ms-2022-0003