From time to time locos may need to be hard wired to run on dcc control, this is not something to avoid, it is easy to do with a bit of soldering skill. There are various reasons you may wish to do this, normally related to removing sockets and pcb’s to create space for decoders and speakers. All you need to do is trace the necessary circuits within the loco and wire your decoder wires appropriately.
The following is an extreme and unusual example showing how a Bachmann Class 47 with 21 pin socket can be hard wired via its existing pcb. In this case the customer supplied the model with 21 pin socket and a Loksound V4 decoder which unfortunately had an 8 pin connection. The 8 pin socket was removed and the wiring hard wired to the appropriate terminals on the locos socket by following the generic 21 pin socket wiring diagram.
In the pictures below you can see the wiring diagram followed by various views of the hard wired installation. A slightly odd example but it does illustrate the way in which a hardwire can be carried out simply by following and understanding the wiring requirements of the loco you are working on. You can therefore treat DCC conversion in similar fashion to the bespoke methods you may use in layout construction.