You’re right, vertical splices in posts need special attention, especially 1) when the posts are 20-22’ long, 2) when they support decks or spaces where people can gather, 3) where cars can impose “extra” load on old existing footings, and 4) lateral displacement depending on seismic activity or seasonal ground movement, 5) how square the two cuts are made at the splice.
1) When posts are 20-22’ long they tend to buckle when over loaded. This is called the “slenderness ratio” and depends on the species and grade of wood. (AND because it’s outdoors I suspect it’s pressure treated.) A typical 20’ 6x6 of spruce-Pine-fir (SPF) can support about 8,000 lbs. depending on its grade. (I’m assuming a middle grade of No. 1 and better, but not a “Select” or a “Dense Select”.) Likewise, a 22’ 6x6 of the same species and grade will support about 7,000 lbs. I’m also assuming the posts are braced in BOTH directions at the 20’ or 22’ splice. If not, it’s a hinge a a bigger problem develops because it becomes a 30’ post...or whatever the existing post adds onto its length.
2) When a post supports decks and other “living” spaces we take extra precautions. Depending on the size of your deck, you could easily overload the post at your next birthday party when the gang starts singing Happy Birthday and jumping up and down. We use 100 lbs. per square foot to calculate the load, but the Code allows 40 PSF. The Code allows an increase in stress (strength) for impact loads, which your party would qualify for, but there’s a reduction for pressure treated posts too.
3) We also worry about adding additional loads to existing footings that have “always been just fine”. You now have a carport and the weight of that car on the soil can make the existing footing settle or tip (lean).
4) If you live in a seismically active area there are special considerations that must be met. I doubt you do, because you say there are independent footings. If you lived in S. California or another active area you wouldn’t have independent footings. (If I’m wrong, I’d get that looked at immediately.) Remember, the post needs to be braced in both directions.
5) Finally, to answer your original question: “can posts be stacked and how should they be connected “. Yes, they can be connected and they should have an adequate connection. The Code does not stipulate how they’re connected, but says it needs to be adequate. If the two ends are not cut perfectly “square” and there is jumping on the post, it could “slide” past the other post, especially if it’s a little wet. (When I cut a 6x6 with my skillsaw I have to turn it a couple of times to cut all the way through. It’s never a perfect cut. Did you have skilled workmen you trust?)
That “sliding” load can be calculated if we know the load on the post. Short of that I would not trust wood 2x6 side blocks nailed into the 6x6’s for a connection. (Someone said blocks on two sides would be ok. I think not because the nailing could be in withdrawal. That’s bad. At a minimum I’d use blocks on 4 sides.)
Without knowing your exact circumstances, I’d prefer a steel connection with braces in both directions at the splice points. You could use something like Simpson ECCLQ. It’s not perfect, but it allows braces in both directions.
Remember, you just created a HINGE. You need to brace it so it doesn’t move.