TLDR: President Jackson transferred a large amount of money out of Federal hands and into state banks, using a method that favored Western expansion at the expense of Northern credit because the wealthy elite businessmen in the North and wealthy plantation owners in the South didn't like him.
The Presidential Election of 1828 was very bitter and decided between John Quincy Adams (Incumbent) and Andrew Jackson. From here:
And by the time the votes were cast, both men would have wild stories circulated about their pasts, with lurid charges of murder, adultery, and procuring of women being plastered across the pages of partisan newspapers.
For those who detested Andrew Jackson, there existed a goldmine of material. Jackson was famed for his incendiary temper and had led a life filled with violence and controversy. He had taken part in several duels, killing a man in a notorious one in 1806. [...] Those opposed to John Quincy Adams mocked him as an elitist. The refinement and intelligence of Adams were turned against him. And he was even derided as a "Yankee," at a time when that connoted shopkeepers reputed to take advantage of consumers.
1828 was a replay of the election in 1824, and Adams won the first round. Jackson was raised "somewhere" in South Carolina, and spent much of his life on the frontier as a soldier (after also being a lawyer, congressman, and Tennessee Supreme Court Justice). Adams was raised in Massachussetts, and spent formative years in Europe as his father served on diplomatic missions. Jackson won the second time around, becoming the first president not born in either Virginia or Massachussetts. He won again in 1832 against Henry Clay after he campaigned against the renewal for the charter of the Second Bank of the United States, which was located in Philadelphia. The President of the bank Nicholas Biddle instigated the issue by asking President Jackson to renew the bank's charter in 1832 at the urging of the Whigs before the election, even though it wasn't due to expire until 1836.
Much through his second term the country had a roaring economy, culminating in a federal surplus of $30 million in 1836 sourced mostly from tarriffs and public land sales, and much of it was deposited in and loaned from the (still somewhat functioning) 2nd Bank. Clay, as a Senator after the election, favored distributing the funds to the states. At first Jackson argued doing so would be unconstitutional, but as the surplus grew larger the states were keen on cashing in. In 1833, Jackson and his Secretary of Treasury Roger Taney supported a policy of distribution of that money to "pet banks", which were chosen from a pool of those loyal to Jackson. The effect of this policy was a shift in a massive (for the time) amount of money off of the East Coast and towards the Western frontier where a lot of those banks were located, forcing many Northern banks to slow their lending. Ultimately this led to rampant land speculation in the west, high inflation, high rate of defaults, and contributed to the Panic of 1837, along with tightening credit in the North and insistance on "Specie" payments for purchase of federal lands.
[T]he Deposit and Distribution Act of 1836 placed federal revenues in various local banks (derisively termed "pet banks") across the country. Many of these banks were located in western regions. The effect of these two policies was to transfer specie away from the nation's main commercial centers on the East Coast. With lower monetary reserves in their vaults, major banks and financial institutions on the East Coast had to scale back their loans, which was a major cause of the panic along with the real estate crash.
Panic of 1837
Is that a "punishment"? I included the bit about the 1828 election because it could be very easy to interpret it that way. That election was just as acrimonious as anything 2016 may have thrown at voters. Jackson and his followers were deeply skeptical of both Northern and Southern elites, and his economic policies were informed by those beliefs.
As a challenge to your premise, I think there's a bigger point here. Regardless of what this president's stated intentions are, I believe that in choosing such locations the general welfare of the population in question will, hopefully, ultimately be better, and I can believe this since the population and elected leaders in those areas have expressed concerns about them. Since they need to be housed somewhere in the interim while each individual status is adjudicated, coupled with the President not showing any inclination to change course on his immigration policy, the President's position could be interpreted as an opening bid for some sort of compromise.
It is possible to not look at this like 'punishment' regardless of what Trump says because he says lots of things, sometimes I think because they just sound good to those who already agree with him. He may even in his heart believe it to be a punishment, but that doesn't really matter. It could also be interpreted as an opportunity, which can be squandered just as easily as $30 million can be back in 1836, or embraced in a way that some amount of "good" (however you wish to measure it) can still come out of it. But if all we're doing is trying to figure out who is the biggest victim, I'm not sure if there's anything positive to be had. Sometimes leaders just like to kick the bee-hive of the opposition.
President Nixon maintained an "Enemies List" for the purpose of manipulating "grant availability, federal contracts, litigation, prosecution, etc." John Dean, White House Counsel for Nixon, explained the purpose further in a memo to Lawrence Higby, who at the time was an assistant to Nixon's Chief of Staff Haldeman:
This memorandum addresses the matter of how we can maximize the fact of our incumbency in dealing with persons known to be active in their opposition to our Administration; stated a bit more bluntly—how we can use the available federal machinery to screw our political enemies.
The original list contained just about 20 people, but morphed into a Master List that was much more comprehensive, ultimately growing to 576 names. The types of harassment that came to light included spreading of rumors concerning business practices in order to hurt opponents' business prospects, and even going so far as targetted IRS Audits for those who spoke out against Nixon. This is not to mention the employment of burglars with the intention of wiretapping the rival political party's headquarters.