Earlier quoted context omitted.
At least if wikipedia's summary is to be believed, that's one of the less supported of many potential theories. https://en.wikipedia.org/wiki/Myopia#Environmental_factors Their summary seems to suggest that the biggest factor is exposure to daylight. So then even reading outside ought theoretically protect against nearsightedness.
> People, and children especially, who spend more time doing physical exercise and outdoor play have lower rates of myopia,[30][29][31][32][33] suggesting the increased magnitude and complexity of the visual stimuli encountered during these types of activities decrease myopic progression. There is preliminary evidence that the protective effect of outdoor activities on the development of myopia is due, at least in pa…
This is what I meant. The GP comment included "and thereby not focusing their eyes over longer distances", which I interpreted to be in contrast to spending time indoors and looking at things close to you. So it's not that things far from you are protective, but specifically variety seems to be. So I think we mostly agree.