This type of motor seems to be an earlier type of motor.
Bavaria mainly fitted AP drives supplied by lewmar (usually in their Whitlock steering components). Examples of this AP motors you can see here
https://www.sailtec.de/products-shop/categories/bavaria-spare-parts/ship-steering-propulsion-control-systems.html?isorc=56319 Check your system, if it is possible to use such a motor/gear combination
I would expect, you dismantled the motor from a gearbox/clutch assembly, which is left in the boat?
Are there any drive sprockets / steering cables or chains, in which this gear assembly is integrated? Photos?
I would see 3 possible solutions to go:
1) Replacement of the whole motor/gearbox/clutch assembly with a newer one, see link above.
2) Replacement with a linear drive , for example raymarine or similar makes
3) Take the existing motor to a repair shop for electric motors and ask if it can be repaired. Maybe there are only the brushes and/or the collector worn.
Good luck