In short: Yes, it's possible to keep a bonsai in a closed terrarium. But in order for the bonsai to thrive you'll have to closely watch the composition of the subtrate and the amount of water. It's important to have a good water-storing ability, quick drainage and a strong ventilation. How you can achieve all that will be explained in this article.
What even is a bonsai?
Bonsais aren't actually a species or even a biological term. Instead it's an eastern form of art trying to keep different kinds of trees small to present them on something like a table. In principle any tree, even native trees, can be bonsais. Of course some species are better suited than others. We're going to have a look at those.

Choosing your bonsai
Bonsai tree can be divided into different kinds. They can be distinguished between the amount of water and the temperature they need. Simply speaking we can distinguish between tropical and subtropical variants.
Subtropical bonsais for your closed terrarium
Subtropical bonsais are native to Southern Europe. You can especially find them in Italy and Spain. Examples are small olive trees (e.g. Olea europaea) or wild pistachios (e.g. Pistacia lentiscus). Subtropical bonsai trees are well suited for room temperature of 20ยฐC and thus, fit very well in your living room. But during the winter months they like 10ยฐC a lot better. You can look at bonsais here (the link is in German, but all the trees have their Latin name listed).
The tropical form
Tropicals bonsais originally come from China. It's not that much warmer over there so you're still fine with 20ยฐC room temperature. Contrary to subtropical species, tropical ones typically don't need winter rest so you can keep them inside all year round. Examples all Zanthoxylum or the Chinese banyan (Ficus microcarpa). You can check them out here (also in German).
How to keep a bonsai in a closed terrarium

Whether you're using a tropical or subtropical bonsai: it'll like it warm and wet. 20ยฐ room temperature are optimal and it can also be a little warmer, if you want. You won't really have to worry about that. In the winter you can put your closed terrarium with bonsai next to the wall of your house. It'll be a little warmer there than outside and a little colder than inside. Try to reach about 10ยฐC. Putting your closed terrarium in a fridge could be a littel impractical due to the size.
Bonsais need a lot of sunlight
Similar to succulents, bonsais need a lot of light in order to grow. If you want to keep your closed terrarium inside you should put in next to a southern or south-western window where the sun will shine in the afternoon. It is the strongest and will provide the bonsai in your closed terrarium with a lot of energy. It's great if your bonsai can get 10 hours of sunlight everyday. More is better!
Alternatively, you can think about using fluorescent tubes or LED lighting. It's important to keep in mind that they are magnitudes less powerful than sunlight. However, special grow lights developed for plants are available. Find out more about lighting in this article.
If you can avoid it, don't put your bonsai into direct sunlight. It will make a lot of water evaporate out of its leaves making it very dry. Although the humidity may rise, it damages the bonsai since it itself is loosing precious water. Additionally, the water on the container's walls can act like a lense making the sunlight more intense and burning your bonsai.
Bonsais in closed terrariums need a well draining substrate
Although bonsais like wet soil, it may never have standing water! Thus, it's very important for you substrate to have a good ventilation. You can achieve that by adding larger pieces (e.g. puffed clay balls, stones, charcoal) so the water can drain into the false bottom better.
Affiliate note: I receive a small commission for some of the products linked in this article, if you buy them through my links. This won't cost you any more than usual! I recommend all of these products based on my honest opinion and not because of the commission I receive. As an Amazon Affiliate I earn through qualified sales. For more information, please read this affiliate note.
I already covered how to mix a good substrate in this article. You can use the same methods for your bonsai. These materials work very well for bonsais:
Puffed clay balls and akadama are both made of clay and absorb water really well. You can choose either one of them or both. They'll store a lot of water for you. Pumice, gravel and volcanic stone are there to make your substrate more coarse so that water drains better into your false bottom. To keep all of it together and so that your plants can anker their roots, use normal potting soil. The Bonsai Empire (German) recommends using different compositions for deciduos trees and evergreens.
For deciduous trees, use a mix of 2:1:1 akadama/pumice/lava granules. Use the same materials in a ratio of 1:1:1 for evergreen trees. If you want to know how to construct a false bottoms, read this article.

Caring and cutting your bonsai
To keep bonsais nice and small, they'll usually have to be cut once in a while. It may be that you'll have to open up your closed terrarium every few months for that. If you notice your bonsai growing too far towards one side, you can cut one of its branches or use a string to pull it away from the container's walls. If you don't care about that you can of course just let nature run wild and do nothing about it.
Summary
It's definitely possible to keep a bonsai in a closed terrarium. You'll just have to make sure that your substrate resists compaction and you have a temperature of about 20ยฐC. Subtropical bonsais will have to be kept a little colder during the winter months. Light is also quite important for a bonsai tree. It needs at least 10 hours of sunlight daily but it doesn't like direct light since it will quickly dry up.
By the way! If you like flowers more than bonsais, check out the article about orchids in a closed terrarium.
Tried with my terrarium. At first I was worried about it being able to live. Fortunately, the tree lived well and grew quite quickly.