Using Javascript, I want to generate a segwit private key (zprv) similarly to how I am generating my legacy base58 extended private key. How?
Key derivation for P2WPKH using the zpub/zprv version bytes is defined in BIP 84. So you can use bip84 library.
let bip84 = require('bip84');

const root = new bip84.fromSeed('rural catch say tooth tell soul road pilot fee board goose wedding')
const child0 = root.deriveAccount(0) // m/84'/0'/0'
console.log(child0)
// zprvAce8anvk7mGXLFgryEKx2b8tETAKuJRFXM1SRN4wuZDw2cwzxYuJ9PJdecA9MJAuAuchhh3cfLfN3SSL8agTL3tJARw6TmgvAKVgcfVcANm