Check tire pressure, set it to around 29. discount tire aired me up to 40 psi one time and it was really bad. Makes a huge difference. The suspension could be worn out, the springs are basically flat when stock, and if they have a negative arch then they're sagging. Seems like not many YJs have stock suspension these days so figure out what you have. Pics will help us help you if you want to try and identify what you've got.
The new shocks could definitely hurt the ride depending on what shock was used. Decide if you want to do some lift or not and go from there. If I were building a rig for 31's I'd probably do the Old Man Emu 2.5" suspension and call it done, although a 1.25" body lift by itself would likely be enough to get the job done too, unless flexing it hard offroad.
The one nice thing about OME suspension is how damn nice it rides. The downside is the cost, but to me it was well worth it.