> ... forcing me to work 8 hours no matter what. This is why I am no longer a software engineer.
The problem wasn't that you were a software engineer. The problem was the companies you were working for.
I usually find this distinguished by whether a company is a software company or a non-software company that requires software by extension (i.e. IT/Big Co).
Stop working for IT companies and go work for a software company. You'll get exactly what you are asking for -- peace and quiet, flexibility, and giving up part of your salary.