It appears you are being pointed in the right direction.
There are exceptions to the size rule, but for the most part you won't find much difference from species to species. Similar to humans, there is a "Joe Average" size.
The best resource I have seen for carpet pythons is THE COMPLETE CARPET PYTHON by Nick Mutton and Justin Julander.
It is a very well written book and it covers about everything you need to know. Both authors have studied the carpet species in their natural environments.
I bought my cages from Ed Lilley of Constrictors NW. Nick Mutton uses Ed's cages however Ed no longer makes cages.
4 x 2 x 2 fits my coastal/mix very well. She's notch or so above 7 feet. You can see her in the perches in the upper right.
As stated, do not sacrifice ground space for arboreal space. Semi arboreal snakes still use the floor. There is a big difference between arboreal and semi arboreal, BIG difference.
These are all 4 feet wide. The top is a royal python cage. She gets 14" of ceiling space. The cage is 4' wide and 2' deep.
The middle cage is the carpet cage. 4 feet wide by 2' by 2'.
I have plenty of space for her to climb and perch. She does use a floor hide occasionally.
The bottom is a boa constrictor cage.
4 feet wide 30 inches deep and 20 inches tall.
I use heat panels in all of the cages.
If you are going 5 feet wide, you'll have a really nice cage. As long as you have about 2 feet of ceiling and depth you'll be in great shape.
The carpet python is a wonderful display snake. If you want to step up your viewing experience, a little added decor can really make your cage as beautiful as a nice tropical fish tank.
Best of luck with the caging and the carpet.