Images are not problematic at all on an e-reader. Here’s an example of how an illustration looks like on my old Kindle:
https://i.imgur.com/zfqbnOO.jpg
Tables and such are also usually just raster images embedded in the epub’s XML:
https://i.imgur.com/SHYUrNL.jpg
https://i.imgur.com/u0tZ2TO.jpg
…and so are code blocks, usually displayed in a monospaced but condensed font and converted to raster image as well to avoid wrapping:
https://i.imgur.com/d7ly8GH.jpg
https://i.imgur.com/g0lIPpj.jpg
Long story short: Images are not an issue, and there’s a way to ensure code blocks will look good by converting them to images. That would indeed require some work, but maybe there's a tool to automate that?
Edit: All examples are from UNIX and Linux System Administration Handbook by Garth Snyder et al., Addison-Wesley Professional; 5th edition (2017)