In Stephen Willard's General Topology appears the following exercise:
A quotient of a second countable space need not be second countable (for each $n\in \mathbb{N}$, let $I_n$ be a copy of $[0,1]$ and let $X$ be the disjoint union of the spaces $I_n$. Now identify the left-hand endpoints of all intervals $I_n$. The resulting space $Z$ is not first countable at the distinguished point, and hence not second countable, although $X$ is second countable.
EDIT: What I had tried was completely misleading and led nowhere, so I decided to delete it.
Your argument is wrong because that infimum of the distances of the preimage of $B$ can be $0$.
You can prove that $Z$ is not first countable by using a diagonal argument. From the definition of quotient topology, every neighbourhood of $\pi(0)$ can be identified with a sequence of intervals $[0,x_n)\subset I_n$. Thus, every neighbourhood of $\pi(0)$ can be thought as a sequence $(x_n)_{n\in \mathbb{N}}$, with every $x_n \in (0,1]$.
Therefore, suppose that there is a countable basis $\{B_n | n\in \mathbb{N}\}$ of the form \begin{align} B_1 &= x_1^1, x_2^1, \dots, x_n^1 \dots \\ B_2 &= x_1^2, x_2^2, \dots, x_n^2 \dots\\ &\vdots \\ B_n &= x_1^n, x_2^n, \dots, x_n^n \dots \\ &\vdots \end{align}
Then we can take the sequence $(y_n)_{n\in \mathbb{N}}$ with every $y_k < x_k^k$ so that the neighbourhood $U = y_1,y_2,...,y_n,...$ does not contain any of the $B_n$.