Great question, and one that more men should be asking openly instead of wondering about in silence. At 46, the shift you're describing is very common and very real, and it doesn't mean things are broken beyond repair.
First, let's address the "spontaneous erections without physical stimulation" question directly. That capacity does naturally decline with age as testosterone levels change and the sensitivity of penile tissue shifts, but it's rarely completely gone. If it is gone, that's actually clinically meaningful information worth investigating. Low testosterone, low dopamine tone, cardiovascular issues affecting penile blood flow, and even subclinical sleep apnea can all blunt that reflex. Before chalking it up to just "getting older," I'd want to know your hormone labs, your sleep quality, and your cardiovascular health. Those are the levers worth pulling first.
Now to the masturbation question. The research and the clinical experience point in a pretty consistent direction: it's not masturbation itself that's the problem, it's the pattern and the stimulus used.
The biggest issue some see is what sex researcher and therapist Barry McCarthy calls "high-stimulation, low-transfer" patterns. When a man masturbates very frequently with a very tight grip (what's sometimes called "death grip syndrome") and to high-novelty pornographic imagery, he's essentially training his arousal system to respond to a level of stimulation that a real partner simply cannot match. The result isn't desensitization of the penis in a physiological sense so much as it's a recalibration of the arousal threshold. The good news is that this is almost entirely reversible.
What actually helps: reducing frequency, especially in the days leading up to partnered sex, genuinely matters for most men. Not for weeks, just a few days of abstinence tends to increase both arousal and erection quality with a partner. More importantly, if you're using porn, consider a meaningful break from it, 30 to 90 days is what most men who report improvement describe. The goal is to reset your brain's dopamine response so that a real human partner feels exciting and arousing again rather than underwhelming by comparison.
When you do masturbate, use a lighter grip and slower pace that more closely mimics the sensations of partnered sex. Some men find that a Fleshlight-type device with a realistic internal texture helps bridge that gap. Fantasy without visual pornography also has value, especially fantasy involving your actual partner. This isn't about moralizing; it's about keeping your arousal system calibrated to something real.
On whether masturbation "enhances" or "de-sensitizes" for partnered sex: both can be true depending on the pattern. Moderate, mindful solo activity that doesn't rely on extreme stimulation tends to maintain sexual interest and penile health, since regular erections and blood flow are actually good for erectile tissue. But compulsive use tied to high-stimulus porn does tend to interfere with partnered sex for a meaningful percentage of men. The research on this has grown substantially in the last decade.