This walkthrough is a amazing and covers a lot of what you just said:
https://www.electrosmash.com/boss-ce-2-analysis
This is why programmers tend to faceplant when confronted with analog circuits, it is absolutely black magic that can't be brute-forced. :)