I know is seems crazy when you first read it, but hear me out.
This idea is inspired by the March 2017 trade between Houston and Cleveland that sent QB Brock Osweiler & Houston's 2018 Round 2 Draft pick to Cleveland.
That trade was a pure salary dump, with Cleveland gaining the future Round 2 pick (which ended up as the #3 pick in Round 2 in 2018, #35 overall) as a reward for absorbing all of Osweiler's remaining guaranteed salary costs. Houston also included their 2018 Round 6 pick and got back Cleveland's Round 4 pick, so the deal basically broke down to: Osweiler + Houston's Round 2 pick for Cleveland's Round 5 pick.
The cap hit that Cleveland took on in the trade was $13M (his guaranteed salary), while Houston converted a guaranteed $16M cap hit in 2017 down to only $3M (a prorated amount of Osweiler's signing bonus).
Jacksonville is now in a situation with Blake Bortles (who they signed to a two year extension ~9 months back) very similar to where the Texans stood with Osweiler in early 2017. Except that the Jags are now in a much more precarious situation vs. the cap than the Texans were back then. The Jags are projected to be ~$7M over the cap threshold in 2019 given their current contracts - and that's before factoring in any FA signings or 2019 Draft pick costs. If the Jags cut Bortles in the offseason, they take a cap hit of $16.5M for the 2019 season. If they designate him as a post-June 1st cut, and keep him on the roster until then, they can move $5M of the $16.5M cap hit into the 2020 season. OTOH, if the Jags can trade Bortles to another team this offseason, they can limit their cap hit to $5M in 2019 and another $5M in 2020.Any team trading for Bortles would have to pay him $6.5M in 2019 & incur a cap hit of $6.5M, whether they cut him immediately or keep him on their roster for all, or part of the 2019 season.
Stealing Cleveland's strategy, John Lynch should step in and offer to take Bortles off Jacksonville's hands in exchange for the Jags' Round 2 pick in 2020 (the NFL likely won't allow the deal to go through for the Jags 2019 Round 2 pick). To complete the trade, the 49ers would need to send something like their 2020 Round 5 pick back to the Jags, or swap late-round draft spots with them. Effectively, the 49ers would be spending $6.5M to buy a 2nd round draft pick from the Jags. That's a no-brainer deal for the 49ers, IMO, since they should have between $60M & $74M in free cap space for 2019.
March 2017 Texans-Browns trade:
Texans: traded Osweiler for $13M in net cap savings in 2017 + Browns 2018 Round 5 pick.
Browns: got Houston's 2018 Round 2 pick & took on $13M in cap hit (and actual hard $$$ payout) for 2017.
My proposed March 2019 49ers-Jags trade:
Jags: trade Bortles for $11.5M in net cap savings in 2017 + 49ers 2020 Round 5 pick.
49ers: get Jags 2020 Round 2 pick & take on a $6.5M cap hit (and actual hard $$$ payout) for 2019.
Some of the minor details of the proposed deal might need to be tweaked. The equivalent Round 5 pick might need to be upped to the equivalent of a Round 4 pick. But, not getting back the Jags 2020 Round 2 pick, or equivalent, would be a deal-breaker.
I'll end by noting that the 49ers could possibly end up not taking the full $6.5M payout & cap hit for Bortles if things fall their way. For example, they could sign him to a new 1-year contract for 2019 where they pay him a $4.5M signing bonus & guarantee him $2M in salary. Theoretically, they could then try to coach him up & showcase him during the 2019 preseason games - with the hope of him performing well enough that he can be traded at the end of August for a 2020 conditional Round 7 draft pick to a team in search of a vet backup. In that scenario, the team that acquired Bortles would only be on the hook to pay Bortles $2M in 2019 and the 49ers would save $2M in hard cash payouts & $2M vs. their cap. Meaning the entire deal would cost them only $4.5M in cap hit.