The heaving was probably frost heave. To reduce this, make sure you place the concrete on a free draining layer of soil, preferably a coarse sand or fine gravel.
You should have an isolation joint between your pool and the deck. This should be cast with you place the concrete by using a styrofoam block placed against the pool, place the concrete, then remove the block (a little paint thinner will melt it right out!). Then put a continuous strip of backer rod (closed cell foam rod) that is 150 percent larger in diameter than the joint width (if 1/2-inch joint, use 3/4-inch rod). Push it down below the surface of the joint to create a sealant reservoir that is about 1/4 to 3/8-inch deep at the center over the rod. This creates somewhat of a "dog bone" shape in cross section to the sealant. After you do this, seal the joint with a urethane sealant. Don't use silicone or latex.
The deck should have joints to prevent random cracking. The joints may be decorative (using redwood strips is a good way), or just functional. For a thin slab on grade, I would suggest your joint spacing be no more than 8 feet in any direction, except if your deck is only about 4 feet wide, the joints should be at about 4 to 5 feet. Sawcut the joints to a depth of 1/4 the thickness of the slab and saw them within 8 hours after you place the concrete (same day!!!)
No need for a foundation wall, provided you don't have an erosion problem.
It should cost you somewhere between $75 and $100 per cubic yard for the concrete. More if it has to be pumped.
Good luck.