How to run JS, PHP and etc. inside WP post?

Natively WordPress posts are subset of HTML (even more like semi-HTML – paragraph tags can be implied and added on output, but not stored). As result it really really doesn’t like to store or process active code in post’s content. This applies both to internal logic in PHP and front-end logic of post editor (it actively tries to strip some things like iframes, when switching to visual editor, etc).

Basically you have two options:

  1. Loosen restrictions on what can be input and sotred in post content – like Exec-PHP you mention in question.
  2. Store active code elsewhere (in custom fields for example) and use shortcode in post content to call it.