A density lemma for families of sequences indexed by the unit interval Suppose for every $x \in [0, 1]$, we have a subset $S_x$ of the natural numbers with asymptotic density $1$ such that if
$n \in S_x$, there is an open neighbourhood $U$ of $x$ (depending on $x$ and $n$) such that $n \in S_y$ for all $y \in U$.
Question:
For any $\varepsilon > 0$ can I find a subset $M$ of $[0, 1]$ with $\mu(M) > 1 - \varepsilon$, and a subset $K \subset \mathbb N$ of positive upper density satisfying the following condition?

*

*For all $x \in M$, there exists some $N > 0$ such that $K \cap [N, \infty)$ is a subset of $S_x \cap [N, \infty)$.

A word on motivation: This question arose in trying to prove this
result on sequences of “almost equicontinuous” functions. The result as stated turns out to be false as shown by Mateusz Kwaśnicki in the comments and Iosif Pinelis in his answer, but I believe if this lemma is true, I can get a subsequence that converges in measure to some function $f$, not necessarily continuous.
 A: Define $S_x=\{n\colon \langle n!x\rangle>\frac 1n\}$, where $\langle \cdot\rangle$ is the fractional part of $\cdot$. Another way to think of this is you can (essentially uniquely) write a number as
$$
x=\sum_{n=2}^\infty \frac{a_n(x)}{n!},
$$
where $a_n(x)\in\{0,\ldots,n-1\}$. This is the expansion of $x$ where the first digit is base 2, the next digit is base 3 etc. $S_x$ is the set of places where $x$ does not have a zero. Notice that if $x$ is chosen uniformly with respect to Lebesgue measure, then the random variables $a_n(x)$ are uniform and independent on $\{0,\ldots,n-1\}$. So we see that $S_x$ has full density for almost all $x$.
Now if $K$ is a subset of $\mathbb N$ of positive density, the probability that $a_n(x)\ne 0$ for each $n\in K$ is
$$
\prod_{n\in K}\frac{n-1}n=\prod_{n\in K}(1-\tfrac 1n).
$$
Since $K$ has positive density, that probability is 0.
In particular, for any $M$ of positive measure, any $K$ of full density and any $N$, $K\cap [N,\infty)$ still has positive density, so we may apply the above to $K\cap [N,\infty)$ to see that the set of $x$'s in $M$ where $K\subset S_x$ has measure 0.
