You don't like visiting your grandma much. Your mom makes you go anyway, whether you like it or not.
Some history before we begin. Thomas has its roots in an old book series called "The Railway Series" written by a British reverend named Wilbert Awdry and his son. The series began during World War 2 and eventually got adapted into a TV series that we're more familiar with, although the early episodes of Thomas are very close to their source content. You might not realize this but the universe of Thomas is pretty fleshed out:
Immediately here we're confronted with the core ideology of the series: a reactionary one. As opposed to progressive views or critiques of old positions, the cornerstone of The Railway Series is nostalgia - a resistance to progress itself. But let's look around for a moment.
The older books were significantly darker than the colorful clueless and happy world of the TV series. There's a particular instance of Percy talking about what's called the "Other Railway," where he says that controllers mistreat their engines and, I'm serious, the engines are ripped apart alive. Here is the image accompanying that story:
We couldn't create a visually more capitalist character if we tried. And the Fat Controller definitely doesn't treat the engines well. Consider their predicament: the engines get little reward (maybe the occasional scrub down) for all labor performed and are punished, sometimes brutally, if they refuse to work (there's an instance of an engine being put behind a shed and turned into a generator). My favorite example of this and perhaps one of the best known Thomas stories is Come Out Henry/Henry to the Rescue. This particular tale also happens to be one of the stories in the first Railway Series books. Here is the two part story, both very short:
Consider your parallels. Within the capitalist economic system, your labor has a set value, let's say 100 value, for a day. But in order to pay those who do no work at all (like shareholders) or little work (like CEOs or higher managers), your company must take value that you produced with your labor and redirect the profits. So you instead compensated for 60 value, while 30 value is paid to leeches and another 10 covers overhead cost, in this hypothetical. This is the reason why capitalism is inherently, genetically, unavoidably exploitative: it cannot function unless it is robbing from the worker (you). This is the indispensable theory of surplus value described by Marx in Capital, and the reason why his works are still echoing in society today. When you hear someone say, "Labor is entitled to all it creates," this is what they're talking about.
We however have had the privilege of decades of the forces of labor and unions fighting for us to receive a greater portion of that value we created, the engines on Sodor are free from the evils of the 20th century progress.
Perhaps there is more to say about the Topham Hatt/engine relationship from a psychoanalytical perspective but I don't feel qualified to take a shot at it. It's certainly true that he has sowed discord and animosity among the workers (the engines often mock each other and are very competitive). The freight cars are painted as lumpenproletarians, being annoying, dirty trouble makers that all of the engines hate working with.
Gender and racial subtexts are also present. A female engine is hard to find (non-existent in earliest stories), and Annie and Clarabel are prim and proper coaches who do nothing but get pulled around by Thomas. There is an occasion where the other engines mock James for accidentally being painted pink. Masculinity (physical strength) is considered the order of operations, as the bigger, more manly engines make fun of the smaller ones and typically get the most important jobs. Diesel engines are painted as "invaders" looking to take Sodor's engines' jobs, and are usually painted black.