You can do it, but it will shorten the vehicle's lifespan.
After a long drive, the engine and brake discs become very hot; spraying them directly with a water gun at this stage can reduce the vehicle's longevity. As is well known, engines and brake discs are typically made of cast iron or aluminum alloy-materials that can contract, crack, or even warp when subjected to rapid cooling.
While doing this once or twice might not cause immediate failure, repeated exposure to such conditions will eventually impair the performance and durability of the brake discs and engine.
















