Do you really wanna know how much it costs? Look at similar streaming hardware (think FireStick, Roku, etc) The hardware (heck, even the software) is the same or very similar for the most part. Smartphones made the hw price (and form factors) go down a lot. If your decoder is DTV or Cable there's an extra cost related to the receiver, but that has also getting cheaper as well. Long gone are the times of the first rec…
Tuners can be cheap or they can be expensive depending on the features you want. I don't think Broadcom's full-band capture tuner, which IIRC is basically a 2GHz ADC, is very cheap. It allows things like pre-tuning to adjacent channels which hastens channel changes. Security on set-tops is a big issue(as well as on OTT devices but STBs are crazy) and that may increase costs. Legacy interfaces like cable cards(no longer needed) increase costs and development time. Cable box SoCs(usually from Broadcom) are beasts and also not cheap. They support things like HDMI in and out, transcoding, multiple video streams(for Picture-in-Picture), etc. They are not in the same league as a Chromecast.
Don't forget about software. A lot of the stack is custom and needs teams of people working year after year to sort-of get it right(STB software is generally horrible). Each MSO(cable company) requests specific changes and customizations(beyond just branding).
Now that's not to say that you couldn't design an IPTV system which uses something like a Chromecast. This is often done and the hardware can be cheaper. I think it stresses out the network more vs, say, a broadcast design where you're dealing with a massive asymmetrical content delivery system which is just pushing the same bits to everyone. It's probably much cheaper to setup a cable headend for 250k+ subscribers than it is to make a IPTV system for the same number of people.
A TiVo box is basically equivalent to a modern set top box(give or take...DVR vs zapper, for instance). I would start with that to get an idea of what a cable box should cost.
Source: 10 or so years in the STB industry. I left because the industry is dying.