According to the definition of firstborn given by Merriam Webster, we have the following:
Definition of firstborn : first brought forth : ELDEST
And in hebrew we have some verses with בְּכוֹר֮ (firstborn):
וּכְנַ֗עַן יָלַ֛ד אֶת־צִידֹ֥ן בְּכֹר֖וֹ וְאֶת־חֵֽת׃
Or in english ESV of Genesis 10:15:
15 Canaan fathered Sidon his firstborn and Heth,
To be more sure, we quote a Esau being the firstborn of Isaac:
אָנֹכִי֙ עֵשָׂ֣ו בְּכֹרֶ֔ךָ עָשִׂ֕יתִי כַּאֲשֶׁ֥ר
Or in english ESV of Genesis 27:19 we see:
19 Jacob said to his father, “I am Esau your firstborn. I have
done as you told me; now sit up and eat of my game, that your soul may
bless me.”
So Pharaoh wasn't a firstborn son since he wasn't killed by the Creator, however he was a firstborn father. But it doesn't say son or father, it says only firstborn in Exodous 12:29, so we can comprehend that the firstborn referred here is truly the firstborn child, and also, in Exodus 12:12 it doesn't say to smite men, it says those born from men (מֵאָדָ֖ם):
וְעָבַרְתִּ֣י בְאֶֽרֶץ־מִצְרַ֘יִם֮ בַּלַּ֣יְלָה הַזֶּה֒ וְהִכֵּיתִ֤י
כׇל־בְּכוֹר֙ בְּאֶ֣רֶץ מִצְרַ֔יִם מֵאָדָ֖ם וְעַד־בְּהֵמָ֑ה
וּבְכׇל־אֱלֹהֵ֥י מִצְרַ֛יִם אֶֽעֱשֶׂ֥ה שְׁפָטִ֖ים אֲנִ֥י יְהֹוָֽה׃
Naturally, a good question would be that, if every person is born of a man, how can it be that he won't smite men? This is simple, when someone says for example, Luke is the firstborn of Heli, we think that it means Luke is the son of Heli giving it a sense of childhood, the same way when we say the son of the man. In reality, it says that the Lord will smite all those who are "from" Egypt (this is, to to be familiarized with the egyptian culture and living it), not living in Egypt, but why to use "בְּ" instead of "מִ"? Well, this is simple, when we say "from" it gives the sense we are talking about the origin of someone, however it the verse, it says also that prisioners would have also been smitten by the Lord. So the expression בְּכוֹר֮ בְּאֶ֣רֶץ מִצְרַ֒יִם֒ means those living as they were from the land of Egypt.