I think it needs to be added to Adrians explanation of electronic sensor contrast, that the 100% contrast is purely hypothetical for straight horizontal or vertical lines of the perfect width, aligned perfectly with the sensor sites.
Which never happens.
The second you have real world detail, micro contrast drops dramatically.
This is due to simple, well known sampling gotchas.
Due to the Bayer filter and demosaicing dropping contrast.
Due to readout noise.
And due to the sensor not being the perfect hypothetical platonic “sensor”.
IE. There is well depth, micro lens arrays, hot mirrors, size and shape of the sensor sites, etc. which combined with incidence of light, wavelength and global contrast has various consequences for micro contrast.
For example it might seem neat that digital cameras can record IR with just a filter. But on every shot with any kind of IR (basically all shots) it will lower contrast in general.