As far as I know the London Naval Treaty only regulated the 35:100 ratio between the RN and the Kriegsmarine. But even if considering the WNT they could afford having more Deutchlands classed as capital ships, as there were plenty of "free" tonnage.
And at the time of the later Hippers Germany could just ignore any treaty regulations, or if they would somehow need to follow it, "do a Mogami" and design them around bigger guns but fit them with smaller and then change when the time is right. A Deutchland with two (mock-up) quadruple 6'' turrets for example.
The Deutchlands had MAN diesel engines with a range of 10 000 nm at 20 knots by the way.