Rewire cigarette lighter to only power on when the car is on

We have a 2012 Lincoln MKZ Hybrid. Long story short I purchased a portable device to use as for CarPlay since we don’t have that feature. It’s powered via the cigarette lighter.

The concern is there is no power button on the device. The only way to shut it off is to unplug the cable from the lighter port.

Has anyone in here messed with the wiring to make it to where the cigarette lighter port only has power when you turn the vehicle on? I know we can just manually unplug it every time, but it would be ideal if the power would just cut off when the car is off. We don’t drive it daily as it’s ours second vehicle and I don’t want to drain the 12v.