Must a continuous function with finitely many strict extrema on a closed interval have bounded variation? And Pointwise convergence of Fourier series We know that if $f$ is a continuous function on $[a,b]$ and has finite number of relative maxima and minima on $[a,b]$, then $f\in \mathrm{BV}([a,b])$, for example, see Show that if $f$ is continuous and has finite number of maxima and minima on $[a,b]$, then $f \in BV([a,b]).$
If we change the condition ``finite number of relative maxima and minima'' to ''finite number of strict maxima and minima'', is this conclusion still right?
The motivation of this question: In Stein and Shakarchi's book: Fourier Analysis: An Introduction, page 128, the author said that ``Dirichlet's theorem states that the Fourier series of a real continuous periodic function $f$ which has only a finite number of relative maxima and minima converges everywhere to $f$ (and uniformly)''. But the application scope of this theorem is very narrow, such as square wave function does not belong to the application scope of this theorem.
We also know that
(Dirichlet-Jordan theorem): Let $f$ be a period $2\pi$ function of bounded variation on $[-\pi,\pi]$. Then the Fourier series of $f$ converges to $\dfrac{f(x^+) + f(x^−)}{2}$ for every $x\in[-\pi,\pi]$.
So my question is, If we change the condition ``finite number of relative maxima and minima'' to ''finite number of strict maxima and minima'', is it right that the Fourier series of $f$ also converges to $\dfrac{f(x^+) + f(x^−)}{2}$. If this is not true, can anyone give a counter example?

Let $[a,b]=[0,1]$ and
$$ f(x)=\begin{cases}0&x=0\\
\min\left\{\frac1{\left\lceil \frac1{2\pi x}\right\rceil},\max\{0,-\sin\frac1x\}\right\}&x>0\end{cases}$$
This is continuous mainly because $\frac1{\left\lceil \frac1{2\pi x}\right\rceil}$ jumps only when $\frac1x$ is a multiple of $2\pi$, in the neighbourhood of which $f$ is constant $0$. On the other hand, in the neighbourhood of when $\frac1x=(2n+1)\pi$, $f$ is constant $=\frac1n$.
This allows us to make use of the harmonic series to see that $f$ is not of bounded variation. On the other hand, due to the plateaus, none of the extrema is strict.
