$E[1_{\lbrace P_T-P_{\tau_n}=0\rbrace}\int_{\tau_n}^T h(s)dN_s]=0?$ If $P_t$ is a standard Poisson process, and $N_t=P_t-t$ the associated martingale then $\int_0^t h(s)dN_s$ is a martingale (assuming that h satisfies the neccessary hypothesis). Thus, considering $\tau_n$ the n-th arrival time ($\tau_n\leq T$), $$E[\int_{\tau_n}^T h(s)dN_s]=0.$$ Can we say that even 
$$E[1_{\lbrace P_T-P_{\tau_n}=0\rbrace}\int_{\tau_n}^T h(s)dN_s]=0?$$
I would appreciate any possible idea. Thank you in advance.
 A: The answer to the first question is yes :
$X_t=\int_{t}^T h(s)dN_s$ this process in not adapted to the natural filtration of $N$ (as it looks into the future) so we can not apply optiaml sampling theorem directly. 
Write $X_t=\int_{0}^T h(s)dN_s-\int_{0}^t h(s)dN_s=Z-\int_{0}^t h(s)dN_s=Z-Y_t$
now $Y_t$ is an adapted martinagle (under good condition on $h$ which we assume fulfilled) so we have $E[Y_\tau]=Y_0=0$ for any bounded stopping times from optimal stopping theorem.  
Moreover we also have $E[Z]=[\int_{0}^T h(s)dN_s]=0 $  
So as $E[X_{\tau_n}]=E[Z]-E[Y_{\tau_n}]=0-0=0$
And I think unless mistaken tha we are done.
The answer to your second question is no because on the event $\lbrace P_T-P_{\tau_n}=0\rbrace$ we have $\forall t>\tau_n; N_t=n-t$ so that $dN_s=ds$ and we get :
$\int_{\tau_n}^T h(s)dN_s=-\int_{\tau_n}^T h(s)ds$ 
Now take $h(s)=1$ and we have a counterexample indeed :
$\int_{\tau_n}^T h(s)dN_s=\tau_n-T$ and now note that, since $\lbrace P_T- P_{\tau_n}=0,\tau_n\leq T \rbrace =\lbrace \tau_n\leq T<\tau_{n+1}\rbrace $, one needs $E[T−\tau_n;\tau_n\leq T<\tau_{n+1}]\not=0$, which indeed holds for every $T$ so the expectation of $\int_{\tau_n}^T h(s)dN_s$ is indeed not null on the event of interest in general. 
