Back on the subject of firearms for character vs character combat...
I have D20 rules for all firearms between their invention and the mid-19th century somewhere, based mostly on the firearms rules document by Ken Hood (of "Grim and Gritty" fame) which I consider the best 3.X era rules document on firearms by far.
Between the 14th and 18th century, the muzzle energy from firearms didn't substantially increase, nor did the effective range of high end muzzle loaders in the hands of an expert increase substantially except at the very beginning and very end of that period. What you mainly saw over this period was increases in practical rates of fire, increases in reliability particularly in adverse conditions, and decreases in cost.
Ken's basic model of a firearm as is relative to the discussion involves the following:
a) Simple Weapon - Ease of use and much greater ease of mastery compared to existing weapons was one of the main attractions.
b) Relatively Accurate - Once the basic idea of a stock was invented and you get past the 'hand gonne' stage, the fast flat trajectory bullet was just simply much easier to aim than any other prior weapon. Ken models this with an inherent bonus to accuracy on most firearms, although this bonus is small during the relevant period.
c) High Effectiveness Against Armor - Most models of the gun make armor either fully effective or else completely ineffective. Ken opts for a more realistic but more complex model of reducing the armor bonus of the target by a degree that increases with the muzzle energy of the weapon so that armor less effective and becomes less effective over time as weapons improve in penetrating power. This system would be somewhat harder to apply to 5e but still seems applicable.
d) Long Reloading Times - This is the main reason firearms didn't completely takeover the battlefield. Early versions had reloading times near 30 seconds - approximately 5 full rounds in 3.X D&D rounds. As firearms technology improved, the time to reload a practical military weapon declined toward 2 full rounds late in the period, or perhaps 1 full round by a well practiced expert (ei, if you take a feat). For something like a wheellock pistol though, the reload times remained very high - some estimates are as high as 10 rounds. So these are typically fire and forget weapons, where you reasonably treat each separate pistol as your reload.
Greater and lesser weapons certainly existed at the time and indeed their were military implications to it during different periods of the relevant timespan. For example, the difference between a Musketeer and a Fusilier was essentially that the Fusiliers were provided with a higher quality weapon, because the higher quality weapons were too expensive initially to provide to any but elite units.
Carbines existed as a concept right from the beginning, but they were typically not called carbines, but things like musketoons. They differ only in having a shorter barrel, and therefore being lighter in weight. D&D doesn't typically model the advantage is wieldiness of a weapon, and hasn't since it dropped weapon speed and weapon length present in 1e from the rules, so the reason for using one probably won't come through in D&D, but a shorter barrel reduces muzzle energy and in consequence reduces damage, accuracy, and range increment. The difference isn't that great though, so if a musket had something like 1d10+1 damage, +1 accuracy, 80' range increment, then the musketoon version with the shorter barrel would be more like 1d10 damage, +0 accuracy, 60' range increment.
Prior to the 19th century and the Minié ball, rifling tends to increasing loading time, increase cost, increase range, and increase accuracy. Until the Europeans ran up against American militia with great practice hunting, rifling was considered to be a poor tradeoff, as rate of fire was considered the most important trait of a firearm (and for military applications cost wasn't far behind). However, the British at least, learned a few things from attempting to take back the colonies, and afterwards began fielding elite units of rifles - an advantage they would have over the French in the Napoleonic wars.
If you apply Ken Hood's rules, I think you'll get realistic combat with firearms relative to the period's technology, while still allowing PC's to remain heroes of story at higher levels. If you don't want realism though, then you'll need to figure out where to tweak it from there to get what you want. If you start moving past the end of the 18th century, into Napoleon and later, you'll run into the problem that guns are so lethal to low level characters, that D&D's basic rules assumptions probably won't allow for heroic play if you use anything like a realistic progression of firearms technology. Caplock weapons with rifled miniballs - much less revolvers and civil war era breach loaders - will absolutely wreck low level characters. Go into the late 19th century or 20th, and you start having units of low level soldiers being a legitimate threat to mid to high level characters.