The main reason to hold munis is if you live in a state with a high income tax and you target muni bonds that are exempt. Supply and demand for munis tend to cause them to be priced so high that they're only a good deal for those in high brackets. I.e. someone who will have high tax liabilities will always want these bonds more than someone with low tax liabilities, and will thus have a higher willingness to pay.
If you don't fit that demographic, then yes, by all means pivot into a CD. Otherwise, do the math on your tax liability in the CD versus the lack of liability in the muni.
WRT the timing - now versus after the ex-dividend date - it's a wash in every way except taxes. When the fund pays a dividend, expect the price per share to go down an equivalent amount, all things being equal. So it's a decision to take a capital gain (or smaller capital loss) earlier versus a possibly-tax-exempt dividend later. Figure out if you'll pay more or less on the dividend amount if taken as a capital gain/loss or as a dividend.
One last note: CDs are no longer "in the 5% range". My brokerage is offering an FDIC-insured one-year CD yielding 5.833% today. It's time to think about the "6% range". Rates might rise if another rate hike occurs on November 1. Current odds of that happening are 30% but it's a reason to wait.
You mention liquidity as a benefit you are seeking, but CDs are fairly illiquid. They'll charge you a fee for early withdraw. If it's liquidity you want, I suggest SGOV or BIL, which are ETFs invested in 0-3 month treasuries with very cheap ERs. Expect about 5.5% yields from these, and monthly dividends. They can be liquidated or added to with the click of a button for free on most brokerage platforms. These are the competition for CDs in the ultra-safe end of the market, and CDs are only paying a couple dozen basis points to compensate you for their illiquidity.