First as Shibu said these are single flush pones so you only get one shot at this each year.
In my early ignorance I discovered that, in practice, time of year is not so critical.
I have never killed a pine by pruning when leaving some needles. True these are single flush pines so new buds only grow in spring but we can still cut back any time.
If pruned early spring a replacement flush of buds is probable.
If pruned later new buds will simply be delayed until the following spring but we can still prune any time from spring through to end of summer (and in warmer climes, through winter too) without endangering the tree. The long delay until new buds does freak some people out which, I guess is why most advice is only cut in spring so you get relatively quick results.
Changing out of that potting soil and into an aggregate should be your first order of business (at the next repotting window that is) before you start shortening any/all the tips on the tree. Those tips pay your way to a much faster recovery from these transitional repots if left on the tree. If you start shortening before these inevitable repots, the tree becomes more susceptible to issues and also later takes much longer to recover from those transitional repots (if you choose to do them later instead).
Changing the soil is definitely important but may not be the MOST important. IMHO it depends on the age of the branches and where viable needles are placed that we can cut back to. Remember that needles typically have a 3 year life span. If the oldest needles on a vital branch are already 2 years old they will probably die and fall some time the following summer which will leave a bare section on that branch. We also know that these pines do not bud readily on bare wood so we need to decide which is more important - roots in bonsai soil OR viable buds on some branches.
As you have mentioned, pines handle repotting far better with intact terminal buds so pruning and repotting in the same year is not advised.
It's a case of either prune OR repot.
IMHO we can nurse a tree along in standard potting soil for a year or 2 (after all the nursery has manged it for quite a few years to get the tree to you) but preserving those options for budding on branches is vital to a good end result.
If the branches are only 2 years old we do not need to worry so transplant can take precedence with no issues.
As with much of bonsai, the decisions are as not black and white as some believe. There can be many nuances to achieve all the goals we are after.