The Republicans did this for decades, until they could start building prisons in their districts, then they went into hyper-drive, moving as many prisons into Republican districts as they could, and its well documented, and it is completely egregious.
It gets even worse. For purposes of apportionment prisoners are counted in their place of incarceration rather than their domicile. New York lost a congressional seat by 89 people. How many New Yorkers are incarcerated at Fort Dix?