This is a bad idea for two reasons: it'll cause a decrease in state funding for where you live, and it may be tricky to actually cause your preferred party to get that representative/elector.
First, there are definitely other ways it would backfire, since census data isn't only used for apportioning representatives. It is also used for determining where federal and state funding should go:
How Our Data Are Used
...
To distribute more than $675 billion in federal funds to local, state and tribal governments each year.
Census data informs how states and communities allocate funding for:
If a large group of people of some political party in some state boycotted the census and it wasn't corrected, then that state would receive a smaller portion of federal funding, which would probably be spread fairly evenly over other states (i.e., both Party X and Y in other states benefit).
However, state funding for roads, hospitals, schools, etc. would only be diverted away from areas where the Party X boycotters are concentrated, to the benefit of Party Y supporters as they would receive a portion of the diverted funding.
Second, if you want a deep Y state to lose a representative, presumably you want that representative to go to a Party X state in order to represent the party you prefer. However, there is no guarantee that the representative wouldn't just go to another deep Y state.
After a census, representatives are reapportioned based on a formula intended to appropriate representation. The gist of it is that each state starts with 1 representative, and then the next 385 are given one at a time to states based on a ration between population and representatives it was already given. Here's the order of apportion for the last census.
So, not only would you need to get enough people from some party in some state to boycott the census and drop that state out position for what would have been its final representative, you wouldn't really help your party unless the new order of apportion would result in your party getting that extra representative.
Someone with a political science or mathematics degree (or just some spare time) might be able to calculate which states and how many boycotters are needed to give a new apportionment order that helps one party, but I can almost guarantee one thing: if tens of thousands of Party X voters suddenly disappeared from a deep Y state, somebody's going to notice and try to correct it.