Compression ratio is the ratio between total area(volume) with piston at bottom of stroke and the remaining volume with piston at top of stroke.
so if total volume was 900, and remaining volume was 100 then you would have 900:100 ratio or 9:1
800 in the cylinder and 100 in the head cavity for total 900
4.0l OHV engine has 9.0:1 compression ratio
You wouldn't gain much with skinnier MLS head gasket and it would be prone to early failure, shaving the heads and using thinner gaskets was more common, you also need to change push rod length.
You would also want to go with studs instead of head bolts, and not sure if 4.0l heads have clearance in Ranger engine bay to be installed or removed with studs in place, but just guessing on that.
Could get 9.1, 9.2 would be a stretch
And you have to be careful that thinner gasket matches your bore exactly.
With thinner gasket and shaved head you have to change both numbers in the calculation
so cylinder volume stays at 800 and head cavity 99(thats the part you are shrinking to gain compression), 800 + 99 total volume
899 / 99 = 9.08 ratio
flat top pistons are used for higher compression, 4.0l might get to 10:1 with those, depends on year, there were different stock piston designs from 1990 to 2000.
Info here on that, and the different heads used:
http://www.therangerstation.com/tech_library/40rebuild.shtml
Compression is a double edged sword, the higher the compression the more "rebound effect" you get so more power, but higher compression also means higher heat during compression, so 87 octane fuel(Regular gas) will start to pre-ignite(ping, knock) when compression ratio gets above 9.4:1
So you either have to run higher octane fuel(all the time); or add a Knock sensor, which Ford did on the 4.0l SOHC engine with 9.7:1 compression ratio.
Knock detection causes computer to change spark timing which reduces most of the added power from the higher compression, but it does allow Regular gas to be used.