Electronics can be seen as mechanical devices as well. They open and close “valves” that stop electron flow.
I have no problem thinking of mechanical computers as computers. But they aren’t modern computers. They aren’t digital. They have no memory as such. There are all sorts of computations they are unable to process.