Updated to reflect discussion in comments . . .
I would not assume that a mere means the same thing as merely just because you can swap one in for the other here. But when a mere appears before a noun modified by a cardinal number, you can remove it. So I would parse a mere one stroke like this:
[a mere] [one stroke]
What you want to call these things is between you and your grammarian. Meanwhile, let's look at some examples:
He was a mere one stroke ahead.
He was one stroke ahead.
He was a mere five strokes ahead.
He was five strokes ahead.
Again, it's the cardinal numbers that are key here:
He was a mere child.
*He was child. (incorrect)
The candy was a mere penny.
*The candy was penny. (incorrect)
The candy was a mere one cent.
The candy was one cent.
The candy was a mere ten cents.
The candy was ten cents.
Linguists Adele E. Goldberg and Laura A. Michaelis offer this explanation:
There exists one systematic exception to the restriction barring the
indefinite article from combining with a cardinal number. The
indefinite article can precede 1-ONE and other cardinal
numbers when the cardinal is preceded by an adjectival modifier:
Butterfat content for sherbet might be a mere one percent or less. (*a one percent)
a scant one week after he died (*a one week)
There will be a lucky one contestant randomly brought back in a pre‐match. (*a one contestant)
TV star Kirstie Alley lost a whopping 30 pounds. (*a 30 pounds)
The site has grown to a staggering 60 million members. (*a 60 million members)
We postulate that the indefinite determiner is required in this
context because the cardinal number is no longer serving as a
determiner, but rather as a modifier.
Source: One Among
Many: Anaphoric One and Its Relationship With Numeral
One
In simplistic terms: If you put an adjectival modifier in front of your cardinal, your cardinal changes from a determiner to a modifier, and you still need a determiner. Put another way, the indefinite article + adjective is a package deal: [a mere]. No adjective, no article:
*He was a five strokes ahead. (incorrect)
Researcher Stephanie Solt further examines the modified cardinal construction and notes, among other things, that there are . . .
. . . two types of the modified cardinal construction, showing that
both involve coercion of the modified element to the semantic type of
a singular noun, an analysis that suggests an explanation for the
obligatory occurrence of the indefinite article a.
Source:
Two Types of Modified
Cardinals
Here are some examples:
Type 1—adjective modifies noun phrase (quality):
It was a long five miles.
Type 2—adjective modifies cardinal number (quantity):
It was a mere five strokes.
In both cases though, you can remove the indefinite article and the adjective, and if you remove one, you must remove the other. I'll let the linguists continue to postulate beyond that.