They were on the edge of confiscating my tiny Topeak ratchet set at Christmas
tools in carry on are prohibited under UK rules. You must have been very persuasive to have kept it. Glad you did.
OP, something as exotic as a shock isn’t specifically stated as OK or not in my brief scan of the rules. It could be classed as similar to the small gas cylinders that are allowed under CAA guidance. I’d expect it to be disallowed from the UK just because our different airports and their description, interpretation, and application of rules is variable. A shock could be denied because: it contains liquid; it contains a potentially flammable or toxic liquid (stretching credibility there I think); it’s a pressurized vessel! It could explode at the not much reduced from ground-level cabin pressure!; it could be thought to be a tool; the security reviewer doesn’t like the look of it or you; etc
if you do decide to pop it in, good luck!
https://www.caa.co.uk/passengers-and-public/before-you-fly/baggage/safety-advice-on-what-to-pack/
https://www.gov.uk/hand-luggage-restrictions/work-tools