It's correct that the production of 1 ceramic mug requires much more material and energy than the production of 1 plastic cup, but this isn't a fair comparison. Plastic cups are generally used once or perhaps twice and then disposed of. A ceramic mug is likely to be used several hundreds of times before it breaks and is thrown away.
Let's assume you use a plastic cup twice a day and then throw it away. Alternatively you can use a ceramic mug twice a day and then wash it. Let's also assume the lifetime of a ceramic mug is 5 years. This means you need to compare:
- 5 * 365 * production, transport and disposal costs of plastic cup
- 1 * production, transport and disposal costs of ceramic mug + 5 * 365 energy and material costs of water and soap used for rinsing the mug.
I don't have the actual numbers to do the full calculation (they would also depend on the type of plastic cup and ceramic mug and how you rinse the mug), but you can see that in the long run the ceramic mug becomes more environmentally friendly provided the energy and material costs for rinsing are less than the production, transport and disposal costs of 1 plastic cup, which should be the case if you don't use lots of heated water.
There are several articles on the Internet that do make calculations like this. Most articles compare ceramic mugs with paper cups but the idea is the same. Other assumptions in those articles may also vary from what I've written above (e.g. different lifetime of ceramic mug, transport and disposal is sometimes not included, or an article may only compare energy use instead of full environmental impact). The result is that those articles have different outcomes. Nevertheless most articles I've seen conclude that the ceramic mug wins if it's lifetime is long enough and you rinse the mug efficiently.