I bought a house with a pool, and that worked out for me. At the time of the sale, the neighborhood comps suggested I was basically getting a pool and extensive landscaping and hardscaping for free. In my area, a pool doesn't add much to the value of a home. And while it turned out to be a substantial savings compared to starting from scratch, the pool and yard were far from free. I've probable put $20K into the pool (adding automation and equipment and new plaster, etc). So I'm still way ahead, but again, not free.
More importantly, a pool seems like a great thing to own. And for many it is. Just go in with your eyes wide open. It's like a pet, in that you don't have to play with it every day, but you can't just ignore it either. And unlike a pet, there is no getting rid of it. It will be a maintenance obligation for as long as you own the house, whether you use it or not. It'll eventually require extensive repair (like replacing the finish, which might last anywhere from a year to 20 years, depending on where in the cycle you inherit it), and equipment doesn't last forever either. It might be well off at the time of sale, and need next to nothing in terms of repairs or upgrades, or it can be a complete nightmare that will destroy the value of your home (we've heard all variations within that spectrum here on the forum).
The inspection is critical, but choose your inspector carefully. Make sure you have one that really knows what he is doing. I had my pool inspected and he missed multiple thousands of dollars of needed repairs. At the time, I didn't know what I didn't know, so you're way ahead of the curve collecting opinions here first. And we have stories here of pools that passed inspections, only later to reveal a massive structural problem that really could not be fixed. So a guy just glancing at the pool and making sure the equipment runs is not enough. Ask in advance what, exactly, gets inspected and how he does it. Perhaps interview a few inspectors if you can find them. You'll start to hear a consensus of how it should be done, and maybe that'll help you decide who to use.
That all said, I'd do it all again. I love my pool and the fun it brings me, my family and friends and neighbors. So I'm not trying to talk you out of a pool. Just preparing you to hopefully avoid the buyer's regret some pool owners end up experiencing. Pools are great fun, but there is a whole lot more to them than just the fun.