Effect of contributing to qualified retirement accounts with HELOC funds

I’m no economist or financial genius, but I believe that contributions made to a 401k (in this case, a solo 401k) or SEP is tax deductible (subject to limits - but those limits are large for self-employed people, which dh and I are.