I have had the 4x4 module crap out on me once, but usually it’s the shift motor that becomes a problem. Or automatic hubs. The auto hubs are not the greatest. The shift motors are a common failure and part of that is because people go for long periods of time without shifting in and out of 4x4. I‘ve even had manual t-case shifters seize up because they weren’t used frequently enough. Periodically throughout the year if I’m going straight down a road I’ll kick over to 4hi for a couple minutes just to sling some oil around the diff and make sure everything moves like it should. I’ll kick it down to 4lo in the yard sometimes too. I want to make sure it’s gonna work when I need it.
Shift motors aren’t hard to change but you need to do some troubleshooting. 4hi should engage at any speed up to 55mph. 4lo you need to be stopped and in neutral to get it to engage. When you hit the buttons to switch, you should hear some clicking in the cab from wherever the 4x4 control module is (my 88 Bronco II has it in the dash, my 92 Ranger has it under the drivers side jump seat in the extended cab). The modules also have a test button on them.