Something to investigate - talk to IB is what I would do (or any other broke you're interested in) - brokers have an account transfer type of function. I've used it to move positions when I shifted over to Fidelity. The account transfer might just pick up your current account with all of it's positions as is (including the margin debt - this is mostly why you'll need to talk to IB first). No need to convert the positions to cash, and then back to the positions you want.
You might be able to fill out the paperwork for an account transfer, and shift the account from wherever it is to IB (including changing your margin interest payments over to IB's schedule). No taxable events, no conversion into cash and then later back. Just change brokers.
That is advice to talk to IB - I'm not a broker or in the finance industry; I've used an account transfer and it was as easy sounding as I've made it, but I didn't have a margin loan I needed to figure out. I did have stock positions that I didn't convert to cash, and then convert back into stock positions afterwards.
(And I was moving over to Fidelity, but it sure sounded like a standardized industry function - not something special Fidelity did).
in the US, ACATs is the standard for account transfers. so yes, you’re correct. it’s normally very easy, whether partial or full transfer. most of it is automated across brokers, especially when you’re talking about basic tradable securities like stock and options , and cash obviously.