Let me show how a general "shape" of a polynomial $P(x)$ of degree $n$ can be uniquely characterized by a sequence of small integers of length at most $n-3$.
Let $\{ e_1,\dots,e_m \}$ be the extrema of $P(x)$, i.e. $P'(e_i) = 0$, $P''(e_i) \neq 0$, and $e_i < e_j$ for $i < j$. When $e_i$ is a maximum, $e_{i\pm 1}$ are minima and vice versa. It's obvious that $m \leq n-1$, $m$ is even iff $n$ is odd, and $P(e_i)\neq P(e_{i\pm1})$.
Let $k>2$ and consider
$$ \mu(k)= \begin{cases} 0 \text{ when } P(e_j)\neq P(e_k) \text{ for all } j < k\\ \text{else: the smallest } j < k \text{ with } P(e_j)= P(e_k) \end{cases} $$
That means: $\mu(i) = 0$ when $P(e_i)$ is a "new" extremum and $\mu(i) = j$ when $P(e_i)$ repeats the extremum $P(e_j)$.
Examples (please note, that the first entry of the tupels $\mu$ correspond to the third extremum):
$P(x) = x^6 - 14 x^5 + 75 x^4 - 190 x^3 + 224 x^2 - 96 x$
$= x(x-1)(x-2)(x-3)(x-4)^2$, $\mu = \langle 0,0,0 \rangle$

$P(x) = x^6 -11 x^5 + 47x^4 - 97x^3 + 96x^2 -36x $
$= x(x-1)(x-2)^2(x-3)^2$ , $\mu = \langle 0,0,3 \rangle$
$P(x) = x^6 - 15 x^5 + 85 x^4 - 225 x^3 + 274 x^2 - 120 x$ $= x(x-1)(x-2)(x-3)(x-4)(x-5)$, $\mu = \langle 0,2,1\rangle$

$P(x) = x^6 - 6 x^5 + 13 x^4 - 12 x^3 + 4 x^2$
$= x^2(x-1)^2(x-2)^2$, $\mu = \langle 1,2,1\rangle$

$P(x) = x^5 - 10x^3 + 25x = x(x^2 - 5)^2$, $\mu = \langle 0,1 \rangle$

[Thanks to user Exodd!]
We observe that
$\mu(k) \leq k-2$
when $\mu(i) = j$ and $\mu(j) = k$, then $\mu(i) = k$
But these conditions don't suffice to characterize those functions $\nu: \{ 3,\dots,m \} \rightarrow \{ 0, 1,\dots,m-2 \}$ for which there is a polynomial of degree $n = m+1$ such that $\mu(k) = \nu(k)$. (For example there is no polynomial of degree six with $\mu = \langle 0,1,2\rangle$ as pointed to by user Exodd.)
My question concerns several related problems
How to tell or calculate the sequence $\mu$ for a given polynomial?
How to construct a polynomial with $\mu = $ a given sequence $\nu$?
How to characterize the sequences $\nu: \{ 3,\dots,m \} \rightarrow \{ 0, 1,\dots,m-2 \}$ for which there are polynomials with $\mu = \nu$?
The first problem probably is not so easy to solve because you have to decide whether $P(e_i) = P(e_j)$ for $e_i, e_j$ not given by radicals when the degree of the polynomial is greater than $5$.
The second problem seems solvable for special cases (see examples above). But I would be especially interested in
a polynomial of degree 5 with $\langle 0,1 \rangle$a polynomial of degree 6 with $\langle 0,1,0 \rangle$