Wash Sale Rule Across Taxable & Non-Taxable Accounts

I have 200 shares of stock A in my taxable account, 50 shares purchased within the last 30 days, 150 shares purchased >30 days ago, currently holding at a loss.

For tax loss harvesting purposes, I just sold all 200 shares today and plan to buy them back after 30 days.

My understanding of how the wash sale rule could play out are as follows:

1) If I re-purchase stock A after 30 days say Dec 26, 2021, but before January 1st, 2022, it is then considered that I have an open position for 2021 tax year. Doing this generates tax loss for 150 shares out of 200. The 50 shares I purchased during the last 30 days washes out some of the sold shares at a 1:1 ratio.

2) If I re-purchase stock A in 2022 say on January 1st 2022, it would be considered that my stock A position is closed for tax year 2021, and tax loss can be claimed on all 200 shares.

Is the above understanding correct? 

 

What makes it difficult for me find a definitive answer, is that I also have a non-taxable account holding 50 shares of BABA purchased >30 days ago.

a) If I don't sell this 50 shares and keep them in my non-taxable account, what happens to scenario 1 & 2 above?

b) If I want to maximize my tax loss harvesting this year, is my only option to sell these 50 shares now as well?

 

Lastly I'm trading from Canada - although the capital gain taxations are different, I'm pretty sure the rules around washed sales are very much the same in the US & Canada.

 

Any answers to my questions, or advice from a tax point of view would be much appreciated!