Welcome to GP Wizard, Bobbsy, and hope you enjoy contributing to the community here
You have a good question, and the answer may not be entirely intuitive.
Things you can't do without it being called an engine change:
Change any of the below:
Turbo- turbo
Internal Combustion Engine- cam covers
- cylinders
- crankcases
- gear cases
- anything else considered a sub-assembly within a sealed engine
Compressor Equipment- anything involved in pressurising things within the engine
Motor Generator Unit (either)- any part of either energy recovery system that is neither a mechanical part for transmitting power nor a mount
Energy Store- batteries
- clamps
- connectors/cables between batteries
Possibly anywhere depending on individual engine design- programmable semiconductors in an engine electronics device (unless they are in the standard ECU)
- high power switching devices in an engine electronics device (unless they are in the standard ECU)
- anything supporting a programmable semiconductor or a high powered switching device in an engine electronics device (unless they are in the standard ECU)
- any repair to the above that could call into question its being identical in nature to the original component
- any repair to the above that involves patching or other tool-based work not possible in a parc fermé environment. Percussive maintenance is fine
Changing any other parts of the engine (and there are a lot) is perfectly fine.
Major repairs to any other parts of the engine, even those involving the engine leaving the parc fermé environment, is fine (though it would have to be monitored to avoid getting a separate penalty for breaching parc fermé rules).
Opening a seal to inspect the engine is definitely fine, provided the correct paperwork is done first.
Breaking a seal to remove the engine, do a silly dance with it and putting it back without modification is fine. Whether your driver will appreciate "their" engine being treated that way is a separate question.
Anything outside the sealed area except for the casing is automatically not an engine component, but for the purposes of the rule many components within the engine aren't engine components either.
(So, to answer the question Bobbsy posed, "install all new pistons, valves, timing chains, etc" would get it classed as a new ICE... ...but so would changing exactly one piston, or even welding one piston in parc fermé with the appropriate paperwork to fix it).
As John S states, the ICE (internal combustion engine), MGU-H (motor generator unit - heat), MGU-K (motor generator unit - kinetic) and Turbo are counted separately. The ES (energy store) and CE (compressor equipment) are also counted separately and have a 4-component limit.
Appendix 2 of the Technical Regulations has a nice colourful table of what counts and what doesn't for each of the six major regulations the FIA applies to the engine in general.