Long answer: Yes, if you can find a PI/project that's solving the exact problem you want to solve.
The work doesn't have to make money, but it has to make papers. And if your publications aren't landing in high profile journals, your funding (and career) will dry up.
If those things match up with your desires, it will be great, otherwise you're going to be seriously miserable and feel penned in by the work that you're "allowed" (for on-campus political reasons) to do. In a lot of ways industry actually affords more opportunities, depending on the field.
Also in academia there's less ability to pivot when a project isn't working out -- if the results will be "novel" (i.e. you can get a paper out of it), you're pretty much stuck continuing in a line of work until you publish it, even if you've already concluded it won't be useful in the real world.
In industry, as soon as I determine that a piece of work won't be useful, I can drop it and work on something more useful. Personally, I much prefer the criteria of "usefulness" as a reason to continue a project, rather than "novelty". Other people may differ on that preference.
Don't you have much more freedom in academia on what you want to pursue though since it doesn't have to make money or am I mistaken? I'm considering going into academia because I'd like to do research more on the theory side for which there don't seem to be (m)any industry positions.