Hi there!
I'm Pranav, from India....
I just read your project description, and went through the attached image.
The first thing that struck me about the attached circuit was, the op-amp is going to send in 5V to GPIO11, which isn't exactly a great thing to do as they are designed to be only 3V3 tolerant.
I guess using a simple resistor divider, or 2 diodes in series at the output can give you the desired result, without stressing the Raspberry Pi.
The other thought I had was that maybe you'd be better off putting capacitors in parallel. instead of series. This is so, because as capacitors age, (or even when they are new) their topping voltage would be the same, but the capacity might be a little different. In a series circuit, when the capacity of the lowest capacity capacitor would be affective. In parallel, since the voltage is more or less the same, this would not be a problem, and each capacitor will drain to the full of its capacity.
Regarding the 78M05 getting hot, it is pretty simple, it's bringing down 12V to 5V, that's 7V, multiplied by maybe 0.5A? At least 3W or so, wasted as heat. Using a Buck converter will definitely be a great thing to do. Depending upon the usage and space constraints, you could choose between LM2596, MP2307, or one of the many others...
Let's talk about it. And about my credibility, I am a reputed component selector, Schematic designer, and PCB layout and routing expert.
Waiting for your message.
With warm regards,
Pranav