Nuggets have been eyeing a backup big for a while now and Boucher has been on this list. The current roster, aside from some defensive gaps and depth, needs a competent big to relieve Jokic and be stable on the bench. Boucher is a more proven player than Saric (who was meant to be the backup) in this regard. With how constrained the Nuggets are in terms of trades, using their only FRP on a more proven player whilst getting out of Zeke's contract would be worth it.
Also I think Lonnie can be a good bench player on a team that could use a guy who can make his own shot.
For Toronto, getting a FRP is a bargain for Chris Boucher. However, he is not worth a first (even if Toronto get Zeke's contract). If Toronto wants a FRP for him, multiple seconds need to be given which feels like a good compromise in this trade.