RAW: there is a spell called "Trap the Soul" listed on page 211 of the PHB. It is a Wizard spell. Oddly enough, there isn't a spell description to accompany this spell (...and it was errata'd out in later printings. I have a first printing PHB).
RAI: it appears that there was at one time the intention to have a soul trapping spell, but it never made it to print. The function was folded into the "Imprisonment" spell.
See page 252 of the PHB for details of the Imprisonment spell. The Minimus Containment feature, one of five options, seems to meet your criterion of
I wanted the classic "soul trapped in an object" feel.
The target shrinks to about one inch in height and is described as being stuck inside of a gem.
As to "not being able to escape" that will always depend on if this entity / person / demon has any friends who could free said entity. If you keep the gem / prison on your person, then you'd have to be overcome before this entity could be freed.
You'd want the same hope of some chance of being freed if it were cast upon you, I suspect.
In Magic and in D&D, as in war, nothing is final.
Xanathar's Guide to Everything may have filled this gap
In @Vylix's answer, the Soul Cage spell from XGtE fulfills some of the requirements.
The Player's Handbook and basic rules both say this under "Selling Treasure" in chapter 5:
Gems, Jewelry, and Art Objects. These items retain their full value in the marketplace, and you can either trade them in for coin or use them as currency for other transactions. For exceptionally valuable treasures, the DM might require you to find a buyer in a large town or larger community first.
Best Answer
Horsemen of the Apocalypse says a soul gem can have a value of anywhere between 10 gp and 5,000 gp or more
As the description of the value of soul gems in Horsemen (2011) runs over 500 words starting on page 30, it's too long to reproduce here for critique or review, but, in short, the soul gems generated by a cacodaemon's supernatural ability soul lock have a value relative to the strength of the captured soul that's anywhere from 10 gp for souls like those of mindless oozes to 5,000 gp for souls like those of powerful dragons to priceless for souls epic heroes. In short, the soul gem's value depends on what soul's in it.
In the Daemon's listing