Since Washington DC is a federal territory, do all crimes committed there automatically become federal crimes?
Most crimes in DC that would be state crimes elsewhere are punished under the DC Code, which was at one point written by Congress but which the DC Council now has the power to amend (subject to Congress’s right to change it at any time). Crimes under the DC Code are tried in the DC Superior Court, which is generally considered a local court. Its judges are appointed by the President (subject to Senate confirmation) for 15-year terms, but the President must pick from a list made by a commission with both federal and local membership. Appeals from Superior Court go to the DC Court of Appeals, which is not the same as the US Court of Appeals for the DC Circuit. From the DC Court of Appeals, appeals go to SCOTUS just like appeals from state supreme courts.
Prosecution can be done by the city Attorney General (normally handles misdemeanors) or the federal US Attorney for the DC District (normally handles felonies). Jails are handled by a city department, prison terms are handled by the federal BOP.
DC is in the special territorial jurisdiction of the United States, so many generic federal crimes apply there. However, in practice they are not charged in US District Court as violations of the US Code but in DC Superior Court as violations of the DC Code. For double jeopardy and many other constitutional purposes, the DC Code has to comply with restrictions on federal power. This is part of the reason Heller was brought in DC: gun rights groups wanted to set a precedent under the 2nd Amendment before they had to argue that it applied to the states under the 14th.