You must know that many in tech have a very different experience than you (proud of their work, like their colleagues, feel care and development from their boss.)
Similarly many in academics love their work and others hate it.
The difference probably has to do more with who you are / how you go about it / attitude than the field.
It would be valuable to reflect what makes you so miserable in your current field while others are able to thrive. I don't know your situation but some guesses: do you have enough focus on getting into the good environments (eg, Google?) and if so - what's holding you back? Skills, drive, attitude? Do you relate to people or are you a judgmental asshole? etc etc.
I don't know the answer but what I am saying is - you probably won't be happy in academia or anywhere else unless you figure out what's making you not happy where you are.