There is something in the Trump fans that is beyond partisanship. Certainly trusting Putin over our intelligence agencies, attacking the FBI even though it is part of your own Justice Department, and such is beyond the usual Democratic vrs Republican partisanship. Very few judges, appointed by one party or the other, are likely to go along with outright criminal stuff. That's my point here. When Trump takes his nonsense to court, even before Trump appointees, Federalist judges are not "mob owned" judges. They are more conservative than Republican. When they can deliver a conservative decision, they will. However lots of Trump's aims in court are not conservative at all.
As for the gerrymandering decision, the conservatives on the SC left it up to the states. All anybody needs to do is get a Democratic majority on their state supreme court, and bring a "gerrymandering is unconstitutional under the state constitution" case before them. No state nominates supreme court justices by gerrymandered district office holders, so gerrymandering should not affect them. You just need a Democratic majority to elect the right justices or a Democratic majority to elect the right Governor, depending on the state. The demographics of state majorities will make gerrymandering obsolete over the next few years. The only states where that won't happen soon have such a Republican majority that gerrymandering is unnecessary anyway.