I’ve just done exactly this, albeit in a Bavaria 38. The Tak Tanks standard 40l tanks fits nicely into the locker with a bit of work. I made up two bearers from 12mm ply to fix the tank to and fitted a 2 inch drain from the tank to a new through hull fitting for the drain. Vent goes to a Vetus fitting on the side of the hull just under the toe rail.
The head is connected via a diverted valve: one way goes to the existing outflow fitting, the other way to the holding tank. This means only solids go to the tank, thus extending the time between emptying.
Works just fine. I looked at other locations but the locker is the only real answer. We did have a large tank in the port cockpit locker but the long pipe runs and relatively thin tank walls led to problems with smells, both in the locker and in the port aft cabin where the pipe work ran. In addition, the tank had to be emptied by pumping: a significant pain during a hot summer....