According to Wikipedia, the very last male-line Carolingian was Count Odo I of Vermandois. He was also known as Odo the Insane, and he was probably mentally-deficient, although he evidently did marry to Hedwig, the daughter of a knight. Odo's sister Adelaide apparently was the actual ruler of the County of Vermandois. There's no record of Odo ever having children, and he died sometime after 1085. Adelaide, the suo jure Countess of Vermandois married first to a French prince, and after his death, to another Count. She had several children, and her descendants continued to rule in Vermandois. They intermarried with French and English nobility, and most all of Europe's royal families are descended from her. I'm guessing that the Carolingian heir would therefore have to be the senior-most of her descendants, although it would necessarily have to be through the female line. ( I think that the Capetians also have some sort of earlier female-line descent from the Carolingians.)
Assume that the heir of the Carolingians should be the heir general of Charlemagne, the heir by male preference primogeniture. As it turns out, the branch of the Counts of Vermandois were descended from the oldest son of Charlemagne to have children. Unfortunately, 3 of the many sons of Heribert II (c. 880?-943) had children, and I am not sure which of those three sons was oldest. The line of one of the sons seems to have passed by marriage to the ancestor of the Plantagenets and so today the Jacobite heir, Duke Franz of Bavaria, would be the heir of that line. And the line of another son goes down to Odo I of Vermandois and his sister Adelaide. Because of the problems of deciding which child was older in the earlier centuries, there are likely to be several potential heirs of the Counts of Vermandois.
Or maybe the heirs of Charlemagne should be sought though agnatic (male only) primogeniture. And the branch of the Carolingians which lasted for the longest time was the branch of the Counts of Vermandois. But exactly which member of that family was the last male is something of a mystery. There actually were alleged descendants of Eudes/Odo I of Vermandois for centuries, the lords of Ham and the lords of St. Simon. The family of the Dukes of St. Simon became extinct in the male line in 1755, and there might be agnatic cousins existing to this day. But it seems to be generally believed tha tthe descent of the lords of Ham and the lords of St. Simon from the Counts of Vermandois was a bogus pedigree.
But that is not enough to prove that Eudes/Odo I of Vermandois was the last male member of his family. Another branch of the Counts of Vermandois, the Counts of Chinay, allegedly lasted until Louis IV died in 1226 leaving three married daughters: https://fmg.ac/Projects/MedLands/LOTHARINGIAN (UPPER) NOBILITY.htm#OttoChinyB
Assuming that Eudes/Odo I of Vermandois was the last male member of the Carolingian family, his sister Adelaide would seem to be his rightful heir. And as near as I can tell her rightful heirs would be the heirs of Mathilde of Vermandois, the oldest daughter of Adelaide of Vermandois and Hugh of France. NORTHERN FRANCE - VALOIS, VERMANDOIS
Mathilde of Vermandois married Raoul Lord of Baugency and it seems likely that their heirs would be through their daughter Agnes who married Enguerrand II lord of Coucy. CENTRAL FRANCE - BLOIS, TOURS And their line of heirs passe down through many families.
Another way to find the heir of Charlemagne would be to find who his chosen heir was, and the heir of the heir, and so on. Charlemagne selected as his heir his own surviving son Louis I and crowned him co-emperor. Emperor Louis I's oldest son Lothair became king of Lortharingia and Emperor Lothair I, and his only son Louis II (825-875) was the next emperor. Louis II had no sons, but his daughter Ermengardis married Boso King of Provence. It s a complicated problem to find the rightful heir of Emperor Lorthair I but an attempt can be made.
But this discussion is based on the assumption that the rightful heir of Charlemagne and the Carolingian dynasty is the rightful heir of the Carolingian kings of France.
The three sons of Emperor Louis I divided the Frankish kingdom among themselves. Lothair the oldest got the imperial title and the kingdom of Lotharingia, Ludwig or Louis got the east Frankish kingdom or Germany, and Charles the youngest became King Charles of the west Franks or France and eventually became Emperor Charles II the Bald. And an argument can be made that the heirs of the Carolingian kings of France should be restricted to the heirs and descendants of Charles the Bald.
And the last known legitimate male of the French branch of the Carolingians was Otto (c.970-1013/14), Duke of Lower Lorraine. Otto had a sister Gerberga who married Lambert I Count of Louvain, the ancestor of the Dukes of Brabant. Their heir can be traced through male preference primogeniture through a number of marriages, or can be traced by agnatic (male only) primogeniture among the agnatic descendants of Gerbera and Lambert I.
Gerberga had a sister Ermengarde who married Albert I Count of Namur. And again there are probably different heirs of Ermengarde and Albert I by male preference primogeniture and by agnatic primogeniture.
You can try searching Historum for "Heirs of" and you can see a number of threads listing the various heirs of various monarchs and dynasties, many of which are still incomplete. A good discussion of the heirs of the Caroling kings of Germany, or of Lortharingia, or of France would be quite complex.