Would the HELOC be a callable loan? A callable loan requires you to quickly repay in full on demand. Unless you'll be retaining that ability and willingness to do so even if the market drops to 50-60% below peak when the loan is called, I would NOT get the loan.
If the HELOC is NOT callable, then it's a matter of how much the interest will cost you for the next 3 years compared to reduced dividends and no stock valuation improvements over that time followed by a return to prior high values. Does it still make sense at that point?
It's also a matter of what happens if you and your spouse get ill and can't work for an extended time. Or both lose your jobs and can't work. Could your position handle that?
It's also a matter of do you have kids? If you and your spouse die from this, would your kids be better off financially with or without the HELOC in a down market for 3 years?
When I look at these kind of scenarios, I make two lists.
The first list is fun.
"What would I like to happen by doing this action?"
In this case, it's "I would like to make a bonus 20-30% in the stock market by taking advantage of low stock prices and cheap money."
The second list is NOT fun.
It's a list composed of results that COULD reasonably happen that I ABSOLUTELY DO NOT WANT to happen.
Once I have this second list I check to see if I can alter my plan to avoid this catastrophic result.
If I can come up with a plan that has a reasonable chance of reaching my goals and will avoid the known catastrophic risks, then I'm willing to proceed. If not, then not.
Hope that helps.