How is that different than an accelerometer on an airplane stabilizer/stabilator/elevator?
Same with airplanes.
Again no difference between a sub and an airplane when the sub is about neutral buoyancy. Now, if the sub takes on water to dive, there in no comparable mechanism for airplanes to add water or mass while in flight (excluding in flight refueling
). However, some aircraft (e.g., sailplanes) routinely carry water ballast, which they can jettison to control their flight characteristics.
An accelerometer controlling a servo to maintain or change a control axis is no different in a sub than in an airplane. You may be confusing gyros that have a rotating wheel with modern accelerometers. Some use a vibrating weight, and others have no moving mechanical parts at all. They do not have to be reset periodically to a horizon.
John