Remove it (disconnect battery first).
Take the bolts out of the endcaps (2 long ones, 2 short ones).
Take the 2 phillips screws out of the solenoid. Pull that off with a little wiggling.
Separate the endcap and rotor portion, leaving it loosely intact.
Clean up the brushes first. If they don't protrude much beyond their housing, stop , reassemble and go buy a starter. Bad brushes won't last. They need to protrude and have good spring tension. If they don't show 1/8" or more beyond flush, they are done.
Good brushes? Then spray the bejesus out of all the gunk, everywhere with a good degreaser like brake clean or carb/choke cleaner. I use kerosene and a paint brush. Then, when done, lightly lube the solenoid and gear shaft with lubriplate and reassemble it all. The solenoid goes in with a little slot on that arm, so note that.
It really is easy work, just pay attention as it comes apart and don't disassemble more than necessary.
2000 2.5 MO5D 4.10 one-wheel drive DD - gave to my older son
1990 STX 87 2.9 going in.....Junked it
2000 3.0 4WD M05D 4.10 S-cab Off-Road package with 235-75-15" tires, hotrod DD, lol